opauth's redirect back after a sign-in (OIDC callback).
const url = 'https://api.opdns.io/v1/auth/oidc/callback';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.opdns.io/v1/auth/oidc/callbackThe OIDC redirect URI registered at opauth. Checks the state against the
sealed cookie set by startSignIn, exchanges the code at opauth’s token
endpoint with a private_key_jwt client assertion, verifies the ID token
(issuer, audience, signature against opauth’s JWKS, nonce), then finds
the opdns account by its op account subject, or links the account whose
address is the verified address of the ID token, or creates one (refused
when signup is closed, or invite-only and the address is not
allowlisted). Starts an opdns session (the session cookie), remembers the
op sign-in session (sid) so opauth’s sessions.revoked events end it,
and redirects to the return_to of the start. A failure redirects to the
dashboard with ?auth_error=<code> (oidc_failed, signup_closed,
invite_required, email_conflict, access_denied, account_locked).
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The authorization code.
The state sent by the start.
An OAuth error from opauth.
The error’s description.
The issuer (RFC 9207); must be opauth’s.
Responses
Section titled “Responses”Signed in (or refused); redirect to the dashboard.
Headers
Section titled “Headers”Where the browser goes next.
Rate limited (rate_limited). For an API token, the organisation’s plan rate is spent until RateLimit-Reset.
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
The plan limit a plan_limit problem hit.
object
The plan’s value of the limit.
Where to move to a larger plan.
The scope the API token lacked (insufficient_scope).
Example
{ "type": "https://opdns.io/problems/rate_limited", "title": "Too Many Requests", "status": 429, "code": "rate_limited", "detail": "Too many requests in a short time. Please wait a moment, then try again.", "request_id": "5f2c9a0e7b1d4c38", "retry_after": 6}Headers
Section titled “Headers”On every response to an API token: the organisation’s plan rate, requests per one-minute window (api_requests_per_minute).
On every response to an API token: the requests left to the organisation in the current window.
On every response to an API token: seconds until the current window ends and the count resets.
On every response to an API token: the quota policy, <limit>;w=60.
oidc_unavailable: this server has no opauth client configured, or opauth is unreachable.
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
The plan limit a plan_limit problem hit.
object
The plan’s value of the limit.
Where to move to a larger plan.
The scope the API token lacked (insufficient_scope).
Example
{ "type": "https://opdns.io/problems/oidc_unavailable", "title": "Service Unavailable", "status": 503, "code": "oidc_unavailable", "detail": "We couldn't start your sign-in because our sign-in service isn't responding. This isn't a problem with your op account. Please try again in a minute."}