> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getlurk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign-in with another provider

> Trust an OpenID Connect provider that signs tokens with RS256 or ES256 and publishes its keys at a fixed HTTPS address.

Use the `oidc` profile for an OpenID Connect (OIDC) provider other than Clerk and Supabase, which have their own pages: [Clerk](https://docs.getlurk.com/end-user-auth/clerk.md) and [Supabase](https://docs.getlurk.com/end-user-auth/supabase.md). We have tested the `oidc` profile with Auth0. Other providers are expected to work, but we have not tested them.

## What the provider must offer

* An `iss` claim that is a fixed HTTPS address. No port, query, fragment or credentials. The host is a lower case public name with a dot, not `localhost` or an IP address.
* Keys published as a JSON Web Key Set (JWKS) at a fixed HTTPS address.
* Tokens signed with `RS256` or `ES256`, with a `kid` in the header that names the key.
* Tokens with one audience in `aud`. Several audiences are refused.
* A `sub` of 1 to 255 printable ASCII characters, with no spaces.

The issuer is matched against `iss` as an exact string. `https://id.example.com` and `https://id.example.com/` are different issuers.

## How Lurk fetches the keys

Lurk fetches the key set itself and never takes a key from a token. The fetch is strict:

* HTTPS only, on the default port, to a public address. Redirects are refused.
* The answer must be uncompressed JSON of at most 64 KB, within 5 seconds.
* A set holds at most 20 keys. A larger set, a repeated `kid` or private key material is refused whole.
* Lurk skips keys it cannot use: symmetric keys, RSA keys under 2048 bits, curves other than P-256, keys with no `kid`, a `use` that is not `sig`, and algorithms you did not choose.
* An unknown `kid` triggers a new fetch, at most every 30 seconds per issuer.

The key address should share the issuer's origin. A different origin is allowed, but the issuer then shows `key_origin_differs: true`. Check that you trust that address.

## Add it to Lurk

An owner or admin does this in person: Settings, the Sign-in tab, **Add a provider**. Or call `POST /v1/trusted-issuers` as a member.

Set `name` (up to 80 characters), `profile.provider` as `oidc`, the exact `profile.issuer`, the `profile.jwks_url`, `profile.audiences` (1 to 20 values, up to 256 characters each, no spaces), `profile.algorithms` (`RS256`, `ES256` or both) and, optionally, `profile.max_token_lifetime_seconds` (see [the overview](https://docs.getlurk.com/end-user-auth/overview.md#what-the-token-must-carry)).

A project can have 10 unarchived trusted issuers.

The `oidc` profile takes ID tokens only. It checks the signature, issuer, audience, expiry and lifetime, and it refuses:

* A token that says it is anonymous: `is_anonymous: true` or `isAnonymous: true` (`anonymous_session`).
* A token with `typ: at+jwt`.
* An access token with a documented marker: Cognito `token_use: "access"`, or any Auth0 `gty` claim. The token test answers `invalid_token`.

Lurk checks no other marker, so register an audience only your ID tokens carry, such as your app's client ID.

## Provider notes

### Auth0: tested

A real Auth0 ID token passed the token test through the `oidc` profile, and the issuer then turned on.

Register it as `oidc` with the issuer `https://your-tenant.us.auth0.com/`, the key address `https://your-tenant.us.auth0.com/.well-known/jwks.json`, the application's client ID as the audience (Auth0 sends one string), `RS256`, and `max_token_lifetime_seconds` of `36000`. Use your own tenant's address, as Auth0 shows it.

Three traps:

* **Trailing slash.** Auth0's `iss` ends in a slash. The issuer saved without it is a different issuer, and every token is refused as `wrong_issuer`.
* **Lifetime.** An Auth0 ID token lasts 36,000 seconds by default and Lurk's default is 3,600, so set `max_token_lifetime_seconds` to `36000` when you create the issuer. Without it the answer is `lifetime_exceeded`.
* **ID token, not access token.** A token with a `gty` claim is refused.

### Provider status

| Provider | Status | Note |
| - | - | - |
| Auth0 through `oidc` | Tested | See above. |
| Clerk, Supabase | Tested | Their own pages: [Clerk](https://docs.getlurk.com/end-user-auth/clerk.md), [Supabase](https://docs.getlurk.com/end-user-auth/supabase.md). |
| Google | Expected to work | Not tested. Check each value against Google's documentation. |
| Okta, Keycloak, Ory | Expected to work | Not tested. |
| Amazon Cognito | Expected to work | ID token only. Not tested. |
| Microsoft Entra | Expected to work | Single-tenant, version 2 only. Not tested. |
| Firebase | Not recommended | Lurk cannot tell its anonymous users apart, so they could sign in. Its documented key source is x509, not a JWKS. |
| Logto | Reported issue | The default signing key is an elliptic curve key, and Logto's docs name no curve. Lurk accepts only P-256 (ES256), so check your key type. |
| FusionAuth | Reported issue | The default signing key may be HMAC, which is not published in a JWKS. Lurk accepts only asymmetric keys. The issuer is set per tenant. |
| Better Auth | Reported issue | The default algorithm is EdDSA, which Lurk does not take. It issues a JWT, not an OIDC ID token. The issuer defaults to the app's base URL. |
| Zitadel | Reported issue | The default token has several audiences in `aud`. Lurk needs exactly one. |
| Stytch | Reported issue | For some token types the issuer can be `stytch.com/<project ID>`, with no scheme. Check the `iss` of your session JWT. |
| WorkOS | Reported issue | The session token may carry no `aud`. Check yours. |
| Descope | Reported issue | The session token's issuer can be a bare project ID, not an HTTPS address. |
| Auth.js | Not supported | The session token is encrypted (a JWE), and no key set is described. |
| Microsoft Entra, multi-tenant | Not supported | The issuer holds a tenant placeholder, and Lurk matches one exact issuer. |

The notes on providers we have not tested come from each vendor's own material and may be out of date. Test your own token before you rely on it.

## Check the keys, test a token, then turn it on

A generic `oidc` issuer has one step more than Clerk and Supabase.

1. **Check keys** in the dashboard, or `POST /v1/trusted-issuers/{id}/check` with the `expected_revision` you read.
2. **Test a real ID token** from your provider with **Test a token**. See [Linking people](https://docs.getlurk.com/end-user-auth/linking-people.md#test-a-token). Lurk keeps only that it was `verified`, for which revision and when.
3. **Turn it on** with **Turn on**, or `POST /v1/trusted-issuers/{id}/activate` with `expected_revision`. It is refused unless the last check and a verified token test are both at the current revision and at most 24 hours old. The refusal is a `validation_failed` that tells you to run the token test.
4. **Allow new people and events** in **Events people’s apps may send**, under Settings > Sign-in. See [Client API](https://docs.getlurk.com/end-user-auth/client-api.md).

A pause, an activation or an archive raises the revision, so after a pause or archive you check the keys again, and an `oidc` issuer also needs the token test re-run. Clerk and Supabase do not.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.