Set up single sign-on
Let people sign in with OIDC, Google, or a trusted proxy, and keep a recovery account.
An instance administrator turns on one sign-in method for the whole server. Organization administrators can then add their own OIDC providers and rules in Settings → Advanced → Single sign-on. Passwords keep working unless an organization requires SSO.
Choose a sign-in method
Register OpenPost with your identity provider.
Create a confidential web client and add this redirect URI, using your own domain:
https://post.example.com/api/v1/auth/oidc/instance/callbackSet the provider in your environment.
OPENPOST_OIDC_ISSUER=https://id.example.com OPENPOST_OIDC_CLIENT_ID=your-client-id OPENPOST_OIDC_CLIENT_SECRET=your-client-secret OPENPOST_OIDC_NAME=Company sign-inRecreate OpenPost and sign out to test.
The login page shows a button named afterOPENPOST_OIDC_NAME.
You can also enter these values in Settings → Advanced → Configuration → Authentication. The issuer and client ID must be set together.
| Variable | Default | Effect |
|---|---|---|
OPENPOST_OIDC_NAME | Single sign-on | The label on the login button. |
OPENPOST_OIDC_SCOPES | openid profile email | Scopes to request, separated by spaces or commas. |
OPENPOST_OIDC_JIT_ENABLED | false | Creates a passwordless account on a first sign-in with a verified email. An existing account with the same email is never linked automatically. |
OPENPOST_OIDC_BOOTSTRAP_ALLOWLIST | Empty | People who become instance administrator when created this way: an email, or ISSUER|SUBJECT. |
OPENPOST_OIDC_NATIVE_CALLBACK_URL | openpost://oidc/callback | Where the mobile app receives a one-time handoff code after sign-in. Change it only for a custom app link. |
Add providers per organization
Organization administrators open Settings → Advanced → Single sign-on. Identity providers takes an exact issuer URL, client ID and secret, scopes, claim names, and options such as Create assigned users on first sign-in and Require a verified email. After saving, copy the Sign-in callback URL and Back-channel logout URL into your identity provider. The issuer must use HTTPS on a public address, and Microsoft Entra needs a tenant-specific issuer.
Verified domains sends people to the right provider by their email domain after you add a DNS TXT record. Access policy sets SSO mode to Disabled, Optional or Required, and controls local passwords and tokens.
Keep a recovery account
Set OPENPOST_SSO_BREAK_GLASS_EMAILS to the emails of existing instance administrators who may bypass Required SSO in a browser session:
OPENPOST_SSO_BREAK_GLASS_EMAILS=admin@example.comEach account needs a local password and two-factor authentication or a passkey, or OpenPost skips it. The list is applied at every start, and an account removed from it loses the bypass.
Troubleshooting
- Sign-in fails at the provider. Check that the issuer is exact, including any trailing path, and that the server can reach the provider's discovery document.
- New people cannot sign in for the first time.
OPENPOST_DISABLE_REGISTRATIONS=truealso blocks accounts created at first sign-in, and an account that already uses the same email is never linked automatically. - An administrator has no access. Run
openpost grant-admin --email address@example.comon the server.