Authcha as an identity provider
By the end you can
- Explain what an identity provider does and what Authcha offers
- Register a server-side and a browser or phone application
- Choose scopes and read the claims an application receives
- Manage an application: switch off, rotate the secret, restrict who may sign in
The idea
People already have an Authcha account for network devices. Authcha can also sign them in to your applications, such as webmail, a wiki, a ticketing system or software you wrote, by acting as a standard OpenID Connect (OIDC) provider. Any application that offers "Sign in with OpenID Connect", "OIDC" or "generic OAuth 2" can use it.
- Passkey first. People use the passkey they already enrolled: fingerprint, face or PIN, nothing to phish.
- One account. The same directory, user types, numbers and passkeys. Lock or delete a user once and every application stops accepting them.
- Single sign-on. After one sign-in, people move between applications without signing in again, for up to 8 hours.
- Standard. Authorization code flow with PKCE, signed tokens any OIDC library can verify, discovery, refresh, revocation and logout.
This needs the Identity Provider module (Professional and Enterprise).
Requirements
APP_URL in .env must be the https:// address people use, with a DNS name, such as https://id.example.com. It becomes the issuer. Users need enrolled passkeys (or you allow the password-and-code fallback per application). Applications call Authcha's endpoints server to server, so their hosts must trust Authcha's certificate.
Everything an application needs is in one discovery document: https://id.example.com/.well-known/openid-configuration. The console shows it with a copy button under Integrations → Applications. Only the authorization code flow is supported. Implicit and hybrid flows are not.
Register an application
Integrations → Applications → Add application.
- Enter a name. People see "Sign in to name".
- Choose the type:
- Runs on a server (confidential): the application can keep a client secret. Webmail, wikis and most self-hosted software.
- Runs in the browser or on a phone (public): single-page and mobile apps. No secret, so the application must use PKCE.
- Enter the redirect URIs, one per line, also called callback URLs. They are compared character for character, with no wildcards, and Authcha never redirects anywhere else.
- Optionally open Advanced, then Add application.
- Copy the client ID and, for a server-side app, the client secret. The secret is shown once, and Authcha stores only a hash.
Advanced settings
| Setting | Default | Meaning |
|---|---|---|
| Scopes | openid profile email | Which scopes the application may request |
| Access-token audience | none | Values in the token's aud claim. A server that validates tokens itself expects its own name |
| Access-token lifetime | 10 minutes | How long an access token is valid |
| Stay signed in for | 30 days | Refresh-token lifetime, extended each use |
| Your own application | off | Skips the consent screen. For applications your organisation runs |
| Allow password and one-time code | off | A fallback for people without a passkey |
| Who may sign in | every user type | Restrict to some user types |
| Post-logout redirect URIs | none | Where the app may send people after sign-out |
Scopes and claims
An application asks for scopes, and each releases certain claims. openid is always required.
| Scope | Claims |
|---|---|
openid | sub: a stable, opaque identifier that is never the username and never changes |
profile | preferred_username, name |
email | email, email_verified |
groups | groups: the person's user type |
offline_access | Allows a refresh token |
email_verified is true only when an administrator set the address or it came from your directory. Use sub as the key for the person's account in your application, and preferred_username for display and matching existing accounts. The ID token also carries auth_time, amr (how they signed in: a passkey is hwk with user, password and code is pwd with otp) and sid.
Manage applications
- Switch off stops all new sign-ins at once, keeping the settings.
- Rotate secret issues a new secret, shown once. The old one stops immediately, so update the application straight away.
- Delete removes the application and its sign-ins permanently.
- The type cannot be changed. Add a new application instead.
Every change is recorded in the audit trail.
LabHands-on
On the demo as demo-admin (password Authcha-Demo-2026) you can look at the list, and on your install you can do all of it.
- Open Integrations on the demo and find Applications. Look at the discovery URL.
- On your install, fetch the discovery document with
curl -s https://<host>/.well-known/openid-configuration | head -30and find the authorization, token and JWKS endpoints. - Register a test confidential application with one redirect URI. Save the client ID and secret.
- Open the OIDC playground at
/oidc/playgroundon your install (if present) or use any OIDC test client, and sign in with a passkey. - Decode the ID token and check
sub,preferred_usernameandamr. - Rotate the secret and confirm the old one stops working. Then switch the application off and confirm a new sign-in is refused.
Check yourselfQuiz
Cheat sheetKeep this
- Authcha = OIDC provider. Needs the Identity Provider module and
APP_URL=https://<DNS name>. - Discovery:
/.well-known/openid-configuration. Flow: authorization code + PKCE only. - Register under Integrations → Applications. Confidential = has a secret (shown once). Public = PKCE.
- Redirect URIs: exact match, no wildcards.
- Scopes:
openid(required),profile,email,groups,offline_access. Key accounts onsub. - Lifetimes: access token 10 min, refresh 30 days, SSO up to 8 h.
- Read more: Identity provider.