# Check what clients discover

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

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`.

## Hand it over

<Steps>

1. Give them the **issuer**: `https://foobar.cvyuh.com/oauth2`, or your realm's [base URL](/platform/realms/realm-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](/workforce-identity/guides/services/choose-client-authentication/).

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

</Steps>

## Check what their library sees

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](/platform/keys/signing-keys/), and the one key apps
  [encrypt request objects](/workforce-identity/applications/client-security/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.

<Aside type="tip" title="Key caching">
  The key set may be cached for `publication.maxAgeSecs`, 300 seconds by default. Change it with
  `PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/keySettings/keySettings` and `{ "publication": { "maxAgeSecs": 600 } }`. The publish
  lead must stay longer than this plus 300 seconds, or the realm refuses the change.
</Aside>

## If it fails

- **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](/platform/realms/realm-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.

## Related

- [Signing keys](/platform/keys/signing-keys/): what the key set holds, and how it changes.
- [Rotate signing keys](/platform/guides/rotate-signing-keys/): why a library that follows the cache headers needs nothing during a rotation.
- [Discovery](/workforce-identity/applications/registration/discovery/): the discovery documents in full.
