Step 1 — Discovery

Look up Hub's API endpoints instead of hardcoding them.

Before you can call Hub, you need to know its endpoint URLs. You get them from one place: the discovery endpoint.

The request

Pick the tab you prefer. curl runs as-is in a terminal. HTTP shows exactly what's sent, so you can rebuild it with any HTTP library.

curl {hub_base_url}/.well-known/openid-configuration
GET {hub_base_url}/.well-known/openid-configuration HTTP/1.1

Replace {hub_base_url} with the base URL for your environment. See Environments.

No authentication needed.

The response

A JSON document describing Hub's API. These are the values you need:

{
  "issuer": "{hub_base_url}/",
  "authorization_endpoint": "{hub_base_url}/auth",
  "pushed_authorization_request_endpoint": "{hub_base_url}/auth/par",
  "token_endpoint": "{hub_base_url}/oauth2/token",
  "userinfo_endpoint": "{hub_base_url}/userinfo",
  "jwks_uri": "{hub_base_url}/.well-known/jwks.json"
}
FieldYou need it for
issuerThe aud value in every token you sign. Copy it exactly, including the trailing slash.
authorization_endpointStep 2, standard method
pushed_authorization_request_endpointStep 2, PAR method
token_endpointStep 4
userinfo_endpointStep 5
jwks_uriHub's public keys, if you want to verify the ID token it returns

The response contains more fields than these. You can ignore the rest.

Call this at the start of every verification

Don't copy the URLs into your config and forget about them. Endpoints can change, and discovery is how you find out without breaking.

A reasonable approach:

  1. Call discovery when a verification starts
  2. Cache the result briefly — a few minutes is plenty
  3. Read every other endpoint from that cached result

The only value you hardcode per environment is the base URL.

Common mistakes

ProblemCause
Hub rejects your signed request with an audience errorYou wrote the aud by hand instead of copying issuer. The trailing slash matters.
Works in preprod, fails in productionYou hardcoded endpoints rather than reading them from discovery.
404 on the discovery URLWrong base URL. Check it against Environments.

Next

Step 2 — Starting a verification