OpenID Connect (OIDC)
Dev Portal supports any identity provider that implements the
OpenID Connect protocol via the generic
openid provider type. This includes Okta, Keycloak, Authentik, Ory, ZITADEL, AWS Cognito, Google
Identity, and most enterprise IdPs.
Configuration
Add the authentication property to your Dev Portal configuration:
zudoku.config.ts
| Option | Required | Description |
|---|---|---|
clientId | Yes | The OAuth client ID issued by your provider. |
issuer | Yes | The issuer URL. Dev Portal discovers endpoints from <issuer>/.well-known/openid-configuration. |
scopes | No | Scopes to request. Defaults to ["openid", "profile", "email"]. |
Provider Setup
Register Dev Portal as a public SPA / single page application client in your identity provider and set:
- Callback / Redirect URI to
https://your-site.com/oauth/callback - For local development, add
http://localhost:3000/oauth/callback - If your provider supports wildcards, add
https://*.your-domain.com/oauth/callbackfor preview environments - Add your site origin to the list of allowed CORS origins
- Enable the
Authorization Codegrant with PKCE and theRefresh Tokengrant
Okta
- In the Okta admin console go to Applications → Applications → Create App Integration.
- Select OIDC - OpenID Connect and Single Page Application.
- Set Sign-in redirect URIs to
https://your-site.com/oauth/callback(addhttp://localhost:3000/oauth/callbackfor local development). - Under Assignments, assign the users or groups that should have access.
- After creating the app, copy the Client ID. Your issuer is your Okta domain, for example
https://your-tenant.okta.comor a custom authorization server likehttps://your-tenant.okta.com/oauth2/default. - Under Security → API → Trusted Origins, add your site origin for both CORS and Redirect.
zudoku.config.ts
Keycloak
Use the realm issuer URL:
zudoku.config.ts
In the realm, create a client with Client type OpenID Connect, Access type public, and
enable Standard Flow (Authorization Code).
Verifying the Issuer
You can confirm your issuer URL is correct by opening <issuer>/.well-known/openid-configuration in
a browser. It should return a JSON document listing authorization_endpoint, token_endpoint,
userinfo_endpoint, and jwks_uri.
User Profile
After sign-in Dev Portal calls the provider's
UserInfo endpoint and reads
name, email, picture, and email_verified from the response. Map these claims in your
provider if they are not emitted by default.
Troubleshooting
- Discovery fails: verify
<issuer>/.well-known/openid-configurationresolves and matches theissuervalue in the document. - CORS errors on token / userinfo: add your site origin to the provider's allowed origins.
- Redirect URI mismatch: the URI registered with the provider must match the Dev Portal origin exactly, including protocol and port.
- Missing profile fields: ensure
profileandemailscopes are granted and that the provider includesname,email, andpictureclaims in the UserInfo response.