Repository navigation
SSO Okta
This page sets up an Okta OIDC application for Goodnight Check. The examples use the Okta Integrator Free Plan (formerly Developer Edition), but the steps are the same in a paid org. For the generic OIDC/BFF behavior, see Authentication; the environment variables are in Configuration → Authentication and sessions.
Tested with the Okta Integrator Free Plan on 2026-11-09, using the default custom authorization server.
Check is a confidential OIDC client. It needs:
- the issuer URL of an Okta authorization server (the org authorization server, or a custom authorization server);
- a confidential OIDC application with the authorization-code flow and the exact callback URL;
- a claim in the ID token that carries the user's group or role names;
- the three Check roles:
admin,operator,viewer. The Okta group names are yours; theOIDC_*_GROUPvalues map them to these roles.
The default mapping is a groups claim whose values are the Okta group names, mapped
by OIDC_ADMIN_GROUP, OIDC_OPERATOR_GROUP and OIDC_VIEWER_GROUP. This page uses
that default. A claim named roles works the same way: set OIDC_ROLES_CLAIM=roles
and use the Okta group names as the OIDC_*_GROUP values.
Create three groups for the Check roles. Their names are your choice; for example:
<your-admin-group><your-operator-group><your-viewer-group>
Each name must match the corresponding OIDC_ADMIN_GROUP, OIDC_OPERATOR_GROUP or
OIDC_VIEWER_GROUP value exactly. If your directory already has groups for these
roles, use those names.
For each person, Directory → People → Add person: enter the profile and activate the account. Then Groups → Assign and add the person to the group for their Check role.
For a first test, create one user per group. A user can be in more than one group;
Check stores every mapped role and the highest one decides access
(admin ⊃ operator ⊃ viewer).
Applications → Applications → Create App Integration:
- Sign-in method: OIDC - OpenID Connect.
- Application type: Web Application.
- Name:
gn-check, or your chosen name.
Then set:
- Grant type: Authorization Code. Clear Implicit and other grants unless you need them.
-
Sign-in redirect URIs: the exact
OIDC_REDIRECT_URL, for examplehttps://check.example.com/api/auth/callback. -
Sign-out redirect URIs: your Check origin, for example
https://check.example.com/. - Assignments: assign the three groups (or the users) to the app.
- Save, then copy the Client ID and Client secret from the app's General tab.
Check sends the scopes in OIDC_SCOPES, by default openid,profile,email.
The claim must be in the ID token, with the group names Check maps. Use one of the two routes below.
- Open the app and go to Sign On.
- In OpenID Connect ID Token, click Edit.
- Set Groups claim type to Filter.
- Set the claim name
groupsand a filter that matches your three groups, for example Matches regexcheck-.*. - Save.
- Add the
groupsscope to Check: setOIDC_SCOPEStoopenid,profile,email,groups.
Use the org issuer in Check: https://<your-okta-domain>.
Use this route if you need the claim in an access token, or if you want to manage the claim through the Okta API. The default custom authorization server in an Integrator Free Plan org may have no access policy; add one that includes the Check client.
- Security → API → Authorization Servers → default (or your custom authorization server).
-
Claims → Add Claim:
- Name:
groups - Include in token type: ID Token, Always
- Value type: Groups
- Filter: Matches regex
check-.*
- Name:
-
Access Policies → Add Policy, then add a rule that allows the Check client and
the users or groups that sign in. A rule with Authorization Code as the grant
type and the
openidscope is enough. - Save.
Use the custom issuer in Check: https://<your-okta-domain>/oauth2/default.
Check reads the claim from the ID token. Do not create a second claim with the same name.
Set these on the backend; the full list is in Configuration.
| Variable | Set to |
|---|---|
APP_BASE_URL |
https://check.example.com |
OIDC_ISSUER |
https://<your-okta-domain> (Option A) or https://<your-okta-domain>/oauth2/default (Option B) |
OIDC_CLIENT_ID |
the Client ID from step 3 |
OIDC_CLIENT_SECRET |
the Client secret from step 3 |
OIDC_REDIRECT_URL |
https://check.example.com/api/auth/callback (the default is APP_BASE_URL/api/auth/callback) |
OIDC_SCOPES |
openid,profile,email,groups (Option A) or openid,profile,email (Option B) |
OIDC_ROLES_CLAIM |
groups |
OIDC_ADMIN_GROUP |
<your-admin-group> |
OIDC_OPERATOR_GROUP |
<your-operator-group> |
OIDC_VIEWER_GROUP |
<your-viewer-group> |
COOKIE_SECURE |
true (default; keep it for HTTPS) |
SESSION_TTL |
12h default, 15m to 24h |
Production uses TLS. The callback, APP_BASE_URL and the issuer must use the same
browser-visible origin.
Sign in with one user of each group. Check the roles:
- the SPA shows the user and the navigation for the role;
-
GET /api/auth/mereturns the mapped roles; - the ID token's
groupsclaim contains the Okta group names (decode it with any JWT decoder; do not send the token to a third party).
If the claim is missing, check the route you chose: Option A needs the groups scope
in OIDC_SCOPES; Option B needs the claim on the authorization server that
OIDC_ISSUER names.
-
The Okta sign-in page returns to itself, or the app shows no groups. Check that
the redirect URI is exactly
OIDC_REDIRECT_URL, and that the app is assigned to the user or their group. -
The token has no
groupsclaim. For Option A, add thegroupsscope and confirm the app's Sign On groups claim. For Option B, confirm the claim is on the authorization server inOIDC_ISSUERand is included in the ID token. - Okta rejects the sign-in with a policy error. Okta's app sign-on policy still applies. The Integrator Free Plan defaults to two factors; the test user needs a passkey, or a policy that allows password-only for the test groups.
-
OIDC_ISSUERmismatch. Use the org issuer for Option A and the custom authorization server issuer for Option B. The token'sissclaim must matchOIDC_ISSUER.
Published from docs/admin/ in the repository. Edit those files in a pull request; this wiki is overwritten on every push to main and on every v* version tag.
Administration
- Home
- Deployment
- Configuration
- Authentication
- First-run bootstrap
- Operations
- Findings and data
- Troubleshooting
Single sign-on
In the repository