OIDC SSO Setup
This guide walks through configuring OpenID Connect (OIDC) SSO for your FrontLine tenant. OIDC is the recommended protocol for most identity providers.
FrontLine uses Authorization Code + PKCE exclusively — implicit and password credential flows are not supported.
How it works
- A user navigates to FrontLine and enters their email address.
- FrontLine identifies the configured IdP for that email domain and redirects to the provider's authorization endpoint.
- The user authenticates with the IdP.
- The IdP redirects back to FrontLine's callback URL with an authorization code.
- FrontLine exchanges the code for tokens, validates claims, and creates a session.
If JIT provisioning is enabled and the user does not yet exist in FrontLine, an account is created automatically with the configured default role.
Provider setup guides
Microsoft Entra ID
- In the Azure portal, go to Entra ID → App registrations → New registration.
- Set the Redirect URI to:
https://app.frontlinehq.io/api/auth/callback/oidc - Under Authentication, confirm Web platform is selected and PKCE is supported.
- Under Certificates & secrets, create a new client secret. Copy the value immediately.
- Note the following from the Overview page:
- Application (client) ID
- Directory (tenant) ID
- The discovery URL is:
https://login.microsoftonline.com/{directory-tenant-id}/v2.0/.well-known/openid-configuration - Under Token configuration, add optional claims:
email,given_name,family_name.
Okta
- In the Okta Admin Console, go to Applications → Create App Integration.
- Select OIDC — OpenID Connect and Web Application.
- Set the Sign-in redirect URI to:
https://app.frontlinehq.io/api/auth/callback/oidc - Note the Client ID and Client secret.
- The discovery URL is:
https://{your-okta-domain}/.well-known/openid-configuration - Assign users or groups to the application.
Google Workspace
- In the Google Cloud Console, go to APIs & Services → Credentials → Create Credentials → OAuth client ID.
- Select Web application.
- Add the Authorized redirect URI:
https://app.frontlinehq.io/api/auth/callback/oidc - Note the Client ID and Client secret.
- The discovery URL is:
https://accounts.google.com/.well-known/openid-configuration - In Google Admin → Security → API controls, ensure the app is trusted for your organisation.
Custom OIDC provider
Any provider that supports OpenID Connect Discovery can be configured:
- Obtain the Discovery URL (must serve a
.well-known/openid-configurationdocument). - Register FrontLine as a client in your provider with the redirect URI:
https://app.frontlinehq.io/api/auth/callback/oidc - Note the Client ID and Client secret.
Configuring in FrontLine
- Navigate to Settings → Security & SSO → Add Provider.
- Select OIDC as the protocol.
- Choose the provider type (Entra ID, Okta, Google Workspace, or Custom OIDC).
- Fill in the configuration fields:
| Field | Description |
|---|---|
| Discovery URL | The OIDC discovery endpoint from your provider |
| Client ID | The application/client ID from your provider |
| Client secret | The client secret (stored securely — never in the database) |
| Allowed email domains | Email domains that should route to this provider (e.g., yourcompany.com) |
| Default role | Role assigned to JIT-provisioned users |
| JIT provisioning | Enable to auto-create users on first SSO login |
- Configure claim mappings:
| FrontLine field | Expected claim |
|---|---|
email | |
| First name | given_name |
| Last name | family_name |
| Groups (optional) | groups |
- Save the configuration in Draft status.
- Test by logging in with a pilot user.
- Once verified, set the configuration to Active.
Only one IdP configuration can be Active per email domain. If you have an existing active configuration for the same domain, deactivate it before activating the new one.
Group-to-role mapping
If your IdP sends a groups claim, you can map IdP groups to FrontLine roles:
- In the SSO configuration, enable Group-to-role mapping.
- Add mappings: IdP group name → FrontLine role.
- Users are assigned the mapped role on login. If no group matches, the default role is used.
Group-to-role mapping changes are audited.
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| Redirect fails after IdP login | Callback URL mismatch | Verify the redirect URI in your IdP matches https://app.frontlinehq.io/api/auth/callback/oidc exactly |
| "Invalid issuer" error | Discovery URL misconfigured | Confirm the discovery URL returns a valid OIDC configuration document |
| User created without name | Missing claim mapping | Add given_name and family_name to the token claims in your IdP |
| "State validation failed" | Browser session expired or CSRF | Have the user clear cookies and try again; ensure no proxies are stripping cookies |
| JIT user gets wrong role | Default role misconfigured | Check the Default role setting in the SSO configuration |
| Login blocked for SSO user | enforce_sso is off and user is trying SSO | SSO works regardless of enforcement. Check that the email domain is in Allowed email domains |