Skip to content

OIDC discovery viewer

Read an OpenID Connect discovery document: endpoints, grant types, response types, signing algorithms, scopes and claims supported.

Runs in your browser. Nothing you paste is sent to us.

Configuration

https://<host>/realms/<realm>/.well-known/openid-configuration on Keycloak.

Open in a new tab

Fetch asks your browser to read the URL directly; nothing goes through us. It works only when the server allows cross-origin reads. Otherwise, open the URL, copy the JSON and paste it below.

A shortened, made-up sample for the realm acme is filled in. It is not from a real server.

Provider

PKCE with S256 is supported.
The issuer has Keycloak’s layout: realm acme.
issuer
https://auth.example.com/realms/acme
authorization_endpoint
https://auth.example.com/realms/acme/protocol/openid-connect/auth
token_endpoint
https://auth.example.com/realms/acme/protocol/openid-connect/token
introspection_endpoint
https://auth.example.com/realms/acme/protocol/openid-connect/token/introspect
userinfo_endpoint
https://auth.example.com/realms/acme/protocol/openid-connect/userinfo
end_session_endpoint
https://auth.example.com/realms/acme/protocol/openid-connect/logout
jwks_uri
https://auth.example.com/realms/acme/protocol/openid-connect/certs
revocation_endpoint
https://auth.example.com/realms/acme/protocol/openid-connect/revoke
device_authorization_endpoint
https://auth.example.com/realms/acme/protocol/openid-connect/auth/device
pushed_authorization_request_endpoint
https://auth.example.com/realms/acme/protocol/openid-connect/ext/par/request
grant_types_supported
authorization_codeclient_credentialsrefresh_tokenurn:ietf:params:oauth:grant-type:device_code
response_types_supported
codenoneid_tokentokenid_token tokencode id_token
response_modes_supported
queryfragmentform_post
subject_types_supported
publicpairwise
id_token_signing_alg_values_supported
RS256ES256PS256
token_endpoint_auth_methods_supported
private_key_jwtclient_secret_basicclient_secret_postclient_secret_jwt
code_challenge_methods_supported
plainS256
scopes_supported
openidprofileemailaddressphoneoffline_access
claims_supported
subissaudexpiatnameemailpreferred_username
backchannel_logout_supported
true
frontchannel_logout_supported
true
require_pushed_authorization_requests
false

How to use it

  1. Paste the JSON from https://<host>/realms/<realm>/.well-known/openid-configuration.
  2. Or type the URL and press Fetch, if the server allows cross-origin reads.
  3. Read the checks, then the endpoints and the lists of what the provider supports.

What to know

Every OpenID provider publishes its configuration at /.well-known/openid-configuration under its issuer. In Keycloak each realm has its own: https://<host>/realms/<realm>/.well-known/openid-configuration.

Fetch runs in your browser and goes straight to the server; nothing passes through us. Browsers allow it only when the server sends CORS headers that permit it. If the fetch fails, open the URL in a tab and paste the JSON.

The issuer must match exactly where the document was found, and it is the value tokens carry in iss. A mismatch, often from a proxy or hostname setting, makes token validation fail.

What an OpenID discovery document is

An OpenID provider publishes a JSON document that describes itself. It lists the URLs of its endpoints, the flows it supports, the signing algorithms it uses and the claims it can return. Clients read it once and configure themselves from it, instead of hard-coding every URL.

The format comes from OpenID Connect Discovery 1.0. OAuth 2.0 later got the same idea for plain authorization servers in RFC 8414, which uses the path /.well-known/oauth-authorization-server. Most OpenID providers, Keycloak included, serve the OpenID version at /.well-known/openid-configuration under the issuer.

The document is public. It holds no secrets, only facts about the server. That makes it the fastest way to answer questions such as “which token endpoint do I call?” or “does this server support PKCE with S256?”.

Why discovery exists

Before discovery, every client library needed a hand-written list of endpoints for every provider. A typo in one URL broke sign-in, and a provider could not move an endpoint without breaking clients.

With discovery, a client needs only one value: the issuer. It appends /.well-known/openid-configuration, fetches the JSON, and reads everything else from it. Libraries for most languages accept an issuer or discovery URL and do this for you.

The issuer is also the value that ID tokens and access tokens carry in their iss claim. So the discovery document ties together where the client sends requests and what it must check in the tokens it gets back.

What the document contains

OpenID Connect Discovery 1.0 marks some fields as required. A valid document has issuer, authorization_endpoint, jwks_uri, response_types_supported, subject_types_supported and id_token_signing_alg_values_supported. It also needs token_endpoint unless the provider supports only the implicit flow.

Everything else is optional, and providers add their own fields. Here is a shortened, made-up sample in the shape Keycloak serves for a realm named acme. It is not from a real server.

Sample discovery document (made-up, shortened)
{
  "issuer": "https://auth.example.com/realms/acme",
  "authorization_endpoint": "https://auth.example.com/realms/acme/protocol/openid-connect/auth",
  "token_endpoint": "https://auth.example.com/realms/acme/protocol/openid-connect/token",
  "jwks_uri": "https://auth.example.com/realms/acme/protocol/openid-connect/certs",
  "response_types_supported": ["code", "none", "id_token", "token"],
  "subject_types_supported": ["public", "pairwise"],
  "id_token_signing_alg_values_supported": ["RS256", "ES256"],
  "code_challenge_methods_supported": ["plain", "S256"]
}

Endpoints

FieldWhat it is for
authorization_endpointWhere the browser is sent to sign in.
token_endpointWhere the client exchanges a code or credentials for tokens.
userinfo_endpointReturns claims about the signed-in user.
jwks_uriThe public keys used to verify token signatures.
end_session_endpointWhere the browser is sent to log out.
introspection_endpointTells an API whether a token is active (RFC 7662).
revocation_endpointRevokes a token (RFC 7009).
device_authorization_endpointStarts the device flow (RFC 8628).
pushed_authorization_request_endpointAccepts pushed authorization requests (RFC 9126).

Capability lists

The fields ending in _supported are lists. grant_types_supported says which grants the server knows. code_challenge_methods_supported says whether it accepts PKCE and with which methods. token_endpoint_auth_methods_supported lists the ways a client may authenticate, such as client_secret_basic or private_key_jwt. scopes_supported and claims_supported list what a client may ask for.

A value in a list means the server can do it, not that every client may. In Keycloak, a flow listed in the document still has to be switched on for each client.

What this tool does

The viewer reads a discovery document and lays it out so you can scan it. It shows every URL field, every list as a row of badges, and every true or false flag. Fields it does not know are shown too, so provider-specific additions are not hidden.

It also runs a few checks:

  • Required fields: it names any field that OpenID Connect Discovery requires and the document lacks.
  • Issuer scheme: it warns when the issuer does not use https.
  • Issuer match: after a fetch, it checks that the URL you fetched equals the issuer plus /.well-known/openid-configuration.
  • PKCE: it says whether S256 appears in code_challenge_methods_supported.
  • Keycloak layout: when the issuer ends in /realms/<name>, it shows the realm name.

What it does not do

It does not fetch the keys at jwks_uri, call any endpoint, or test that the server really behaves as the document claims. It reads the JSON you give it. Everything runs in your browser, and nothing you paste is sent to us.

How to use the viewer

  1. Find the discovery URL. For Keycloak it is https://<host>/realms/<realm>/.well-known/openid-configuration.
  2. Type it into the Discovery URL field and press Fetch.
  3. If the fetch fails, press Open in a new tab, copy the JSON from the page and paste it into the box.
  4. Read the checks at the top of the result, then the endpoints and the lists.
  5. Copy the endpoint URLs you need into your client configuration or into our request builders.

Fetch, CORS and why paste always works

Fetch asks your browser to read the URL directly. The request goes from your browser to the server; it does not pass through us, and we run no proxy.

Browsers block a page from reading a response from another site unless that site sends CORS headers that allow it. Whether a discovery endpoint sends them depends on the server and on any proxy in front of it. If it does not, the fetch fails with a network error even though the URL opens fine in a tab.

Opening the URL in a tab is a normal visit, not a cross-origin read, so it always shows the JSON. Copy it and paste it into the viewer. The result is the same.

Where you need discovery

Single-page apps

Browser libraries usually take the issuer and fetch discovery at startup. That fetch is cross-origin, so the server must allow it, just as for the viewer. Later calls from the browser to the token endpoint are cross-origin too. In Keycloak, the client’s Web origins setting decides which origins may make those calls.

Back ends and APIs

A web back end reads the authorization and token endpoints. An API that validates JWT access tokens reads issuer and jwks_uri, so it knows which iss to accept and where to get the signing keys. Cache the document; it rarely changes.

Mobile, desktop and device apps

Native apps read the same endpoints. Devices that use the device flow need device_authorization_endpoint, which is only present when the server supports RFC 8628.

Debugging a new provider

When you connect to a provider for the first time, its discovery document answers most setup questions in one page: which grants, which client authentication methods, which algorithms.

How Keycloak serves discovery

Each Keycloak realm is its own issuer with its own discovery document at https://<host>/realms/<realm>/.well-known/openid-configuration. Keycloak 17 and later serve this without the /auth prefix that older versions used. A server set up with a relative path serves it under that path.

Keycloak builds the issuer and endpoint URLs from its configured hostname or, if none is set, from the request it received. Behind a reverse proxy this matters. Set the hostname and the forwarded headers so the URLs match the address users and clients see.

All Keycloak endpoints follow the same layout under the realm: /protocol/openid-connect/auth, /token, /userinfo, /logout, /certs, /token/introspect, /revoke, /auth/device and /ext/par/request.

Common problems and fixes

The issuer does not match

Tokens carry the issuer in iss, and clients reject tokens whose issuer differs from the one they expect. A common cause is a proxy: the server sees an internal address and builds an issuer such as http://keycloak:8080/realms/acme. Fix the hostname and proxy settings, then fetch the document again.

http instead of https

An issuer with http:// behind a TLS-terminating proxy usually means the server does not know the original request was https. Configure it to trust the forwarded protocol header from your proxy.

A 404 on the discovery URL

Check the realm name, which is case-sensitive, and whether your server uses a path such as /auth. The realm must exist and be enabled.

S256 is missing

If code_challenge_methods_supported is absent or lacks S256, the server does not advertise PKCE with SHA-256. Keycloak lists it. For another provider, check its documentation before you rely on PKCE.

Security notes

Fetch discovery over https only, and only from the issuer you trust. A client that takes its endpoints from a forged document will send users and codes to the wrong place.

Pin the issuer in your configuration and check that the document’s issuer equals it. OpenID Connect Discovery requires this match.

RFC 9700, the OAuth security best current practice, recommends PKCE for all clients and advises against the implicit flow. A server may still list token and id_token token in response_types_supported. That only means it can do them; use code with PKCE.

Best practices

  • Configure clients with the issuer, not with individual endpoint URLs.
  • Cache the document and the keys, and refresh the keys when a token arrives with an unknown kid.
  • Check issuer against your pinned value on every load.
  • Prefer code with S256 even when the server lists other response types.
  • Read token_endpoint_auth_methods_supported and pick the strongest method your client can use.
Questions

Frequently asked questions

What is the .well-known/openid-configuration URL?

It is the address where an OpenID provider publishes its discovery document. The URL is the issuer followed by /.well-known/openid-configuration. Clients fetch it to learn the provider’s endpoints and capabilities.

Where is the Keycloak discovery endpoint?

At https://<host>/realms/<realm>/.well-known/openid-configuration. Each realm has its own. Servers on old versions, or set up with a path, have it under that path, such as /auth/realms/<realm>/….

Why does the fetch fail when the URL opens in my browser?

Opening the URL is a normal visit. Fetching it from another page is a cross-origin read, which the browser allows only if the server sends CORS headers that permit it. Copy the JSON from the tab and paste it instead.

Why is the issuer in my Keycloak discovery document wrong?

Keycloak builds the issuer from its configured hostname or from the request it received. Behind a reverse proxy it may see an internal address. Set the hostname and forwarded headers so the issuer matches the public URL.

What is the difference between openid-configuration and oauth-authorization-server?

Both are discovery documents with similar fields. openid-configuration comes from OpenID Connect Discovery 1.0. oauth-authorization-server comes from RFC 8414, for OAuth servers that may not do OpenID Connect.

Does the discovery document contain secrets?

No. It is public by design and lists only URLs and capabilities. The signing keys at jwks_uri are public keys.

How do I know if a provider supports PKCE?

Look for code_challenge_methods_supported in the discovery document. If it lists S256, the provider supports PKCE with SHA-256. If the field is missing, the provider does not advertise PKCE.

How often should a client re-read the discovery document?

The specification sets no interval. Many libraries cache it for the life of the process or for some hours. Refresh the signing keys from jwks_uri when a token arrives with a key id you do not know.

Rather not run Keycloak yourself?

We run it for you on a cluster of your own, with backups, upgrades and written support. Starter and Premium begin with a 7-day trial.