Skip to main content
Ragen can let people sign in with their company account through one OpenID Connect provider. That covers Microsoft Entra ID, Google Workspace, Keycloak, and any other issuer that publishes a discovery document. Company sign-in is part of the open edition, and it stays off until you configure it. Email-and-password and magic-link sign-in keep working alongside it.

What you need from the identity provider

Register Ragen as an application (Entra ID calls this an app registration, Google calls it an OAuth client) with:
  • Redirect URI: <APP_URL>/api/auth/callback/oidc, for example https://ragen.example.com/api/auth/callback/oidc
  • Scopes: openid, email, profile
  • A client ID and a client secret

Configuration

Set these on the web app:
In the Microsoft Entra admin center, go to App registrations → New registration:
  1. Supported account types: Accounts in this organizational directory only (single tenant).
  2. Redirect URI: platform Web (not Single-page application), value <APP_URL>/api/auth/callback/oidc. Entra accepts http only for localhost. Add one URI per environment you sign in to.
  3. From Overview, copy the Application (client) ID and the Directory (tenant) ID.
  4. Under Certificates & secrets → New client secret, copy the Value column. The Secret ID next to it is a GUID that looks like a client ID, and it does not work as either one. The value is shown only once.
  5. Under API permissions, add the delegated Microsoft Graph permissions openid, email and profile. Each person consents on their first sign-in. To skip that prompt for everyone, grant admin consent.
Ragen needs an email claim in the ID token, and Entra leaves it out when the account has no email address. For a work account, that address is usually the Email field (the mail attribute), which accounts with a Microsoft 365 mailbox have. For an account without one, fill in Email on the user’s properties. If the claim is still missing, add email as an optional ID token claim under Token configuration. Without the claim, Ragen has no address to check and refuses the sign-in.
Use your tenant id, not common or organizations. A multi-tenant issuer vouches for accounts outside your company. Set OIDC_TRUST_EMAIL=true only when your tenant owns every domain in OIDC_ALLOWED_DOMAINS.
Restart the web app after changing these. A partial configuration turns company sign-in off and shows on the setup checklist on the sign-in page. Password sign-in is never affected.

Who gets in

  • Domain. Ragen refuses any address outside OIDC_ALLOWED_DOMAINS before it creates or links an account, and sends the person back to sign-in with an error. The match is exact: sub.example.com is not example.com.
  • Existing accounts. If someone already has a password account with the same address, the company sign-in links to it only when the issuer reports the address as verified, and only for an allowed domain. An issuer that does not own your domain cannot take over a local account by claiming its address.
  • Tokens. Ragen verifies the ID token against the issuer’s published keys, and uses PKCE.

Where new users land

With OIDC_JOIN_ORGANIZATION set, a person signing in for the first time becomes a member of that organization, even when registration is closed. The identity provider and the allowed domains decide who that is, and an administrator promotes members as usual. This only applies when the address is verified, either by the issuer or by OIDC_TRUST_EMAIL. If the organization you name does not exist, the sign-up is refused. Without OIDC_JOIN_ORGANIZATION, company sign-in works like the other sign-up methods. It needs registration to be open, or an invitation, and each new user gets an organization of their own.

When something goes wrong

When sign-in is refused

A refused company sign-in sends the person back to the sign-in page, with a message under the Sign in with … button. Ragen creates no account and no membership on a refusal. The address bar ends in ?error=<code>. Ask the person for that code or the message, then look it up here. The messages are translated into every language the interface supports. SAML, SCIM directory sync, and MFA are not built yet. See the roadmap.