Skip to content
PlatformMarkdown

Check what clients discover

Hand a developer one value, the issuer, and their library reads the rest from the realm's public documents.

APIRFC 8414, OpenID Connect Discovery 1.0, RFC 7517

A developer is wiring an app or an API to your realm. They don’t need a list of endpoints, algorithms and keys from you: their OAuth or OpenID Connect library reads all of that from the realm’s public discovery documents, and keeps up with key rotations by itself. This guide is what to hand them, and how to see what their library will see.

Before you start: you’ve registered the developer’s client in the realm, and you know the realm’s host name. The documents below are public; changing the cache time needs MODIFY on the realm’s keySettings.

  1. Give them the issuer: https://foobar.cvyuh.com/oauth2, or your realm’s base URL plus /oauth2 if you’ve set one.

  2. Give them their client id: the id you registered the client under, and the secret or key arrangement you registered it with. See Choose how a client proves itself.

  3. For an API, give them its audience: the address in their client’s allowedResources.

Open these in a browser; they are public:

  • https://foobar.cvyuh.com/.well-known/oauth-authorization-server/oauth2: the endpoints, grants, scopes, client authentication methods, signing algorithms, PKCE, DPoP, pushed requests, and how a request object may be encrypted.
  • https://foobar.cvyuh.com/oauth2/.well-known/openid-configuration: the same, plus OpenID Connect’s claims and ID token algorithms, while the realm offers openid.
  • https://foobar.cvyuh.com/oauth2/jwks: the public signing keys, and the one key apps encrypt request objects to ("use": "enc").

Only what is switched on is listed. A grant you haven’t offered, such as device sign-in, doesn’t appear, so a library never tries it.

  • The library reports an issuer mismatch. It was given a host name other than the one in the discovery document’s issuer, or the realm’s base URL changed. Give it exactly the issuer the document shows.
  • 404 on the OpenID Connect document. The realm doesn’t offer openid. Use the OAuth 2.0 metadata address, or turn openid on.
  • A grant the developer needs isn’t listed. It isn’t switched on for the realm, or for their client.
  • Signing keys: what the key set holds, and how it changes.
  • Rotate signing keys: why a library that follows the cache headers needs nothing during a rotation.
  • Discovery: the discovery documents in full.