oidc profile for an OpenID Connect (OIDC) provider other than Clerk and Supabase, which have their own pages: Clerk and Supabase. 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
issclaim that is a fixed HTTPS address. No port, query, fragment or credentials. The host is a lower case public name with a dot, notlocalhostor an IP address. - Keys published as a JSON Web Key Set (JWKS) at a fixed HTTPS address.
- Tokens signed with
RS256orES256, with akidin the header that names the key. - Tokens with one audience in
aud. Several audiences are refused. - A
subof 1 to 255 printable ASCII characters, with no spaces.
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
kidor 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, ausethat is notsig, and algorithms you did not choose. - An unknown
kidtriggers a new fetch, at most every 30 seconds per issuer.
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 callPOST /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).
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: trueorisAnonymous: true(anonymous_session). - A token with
typ: at+jwt. - An access token with a documented marker: Cognito
token_use: "access", or any Auth0gtyclaim. The token test answersinvalid_token.
Provider notes
Auth0: tested
A real Auth0 ID token passed the token test through theoidc 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
issends in a slash. The issuer saved without it is a different issuer, and every token is refused aswrong_issuer. - Lifetime. An Auth0 ID token lasts 36,000 seconds by default and Lurk’s default is 3,600, so set
max_token_lifetime_secondsto36000when you create the issuer. Without it the answer islifetime_exceeded. - ID token, not access token. A token with a
gtyclaim is refused.
Provider status
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 genericoidc issuer has one step more than Clerk and Supabase.
- Check keys in the dashboard, or
POST /v1/trusted-issuers/{id}/checkwith theexpected_revisionyou read. - Test a real ID token from your provider with Test a token. See Linking people. Lurk keeps only that it was
verified, for which revision and when. - Turn it on with Turn on, or
POST /v1/trusted-issuers/{id}/activatewithexpected_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 avalidation_failedthat tells you to run the token test. - Allow new people and events in Events people’s apps may send, under Settings > Sign-in. See Client API.
oidc issuer also needs the token test re-run. Clerk and Supabase do not.