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-configurationGET {hub_base_url}/.well-known/openid-configuration HTTP/1.1Replace {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"
}| Field | You need it for |
|---|---|
issuer | The aud value in every token you sign. Copy it exactly, including the trailing slash. |
authorization_endpoint | Step 2, standard method |
pushed_authorization_request_endpoint | Step 2, PAR method |
token_endpoint | Step 4 |
userinfo_endpoint | Step 5 |
jwks_uri | Hub'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:
- Call discovery when a verification starts
- Cache the result briefly — a few minutes is plenty
- Read every other endpoint from that cached result
The only value you hardcode per environment is the base URL.
Common mistakes
| Problem | Cause |
|---|---|
| Hub rejects your signed request with an audience error | You wrote the aud by hand instead of copying issuer. The trailing slash matters. |
| Works in preprod, fails in production | You hardcoded endpoints rather than reading them from discovery. |
| 404 on the discovery URL | Wrong base URL. Check it against Environments. |
Next
Updated about 7 hours ago