Sign in with your op account (OIDC).
const url = 'https://api.opdns.io/v1/auth/oidc/start?prompt=login';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/start?prompt=login'Starts a sign-in (or a sign-up: opauth handles both) with the op account
at opauth.net: redirects the browser to opauth’s authorization endpoint
with PKCE (S256), a state and a nonce, which a short-lived, sealed,
HttpOnly cookie keeps for the callback. A top-level browser navigation,
never a fetch. return_to is a dashboard path (or a URL on the
dashboard’s origin) to land on after the sign-in; anything else is
ignored. prompt=login asks opauth for a fresh sign-in (the dashboard’s
step-up after 403 reauth_required). 503 oidc_unavailable when the
server has no opauth client configured.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Dashboard path or URL on the dashboard origin to return to.
login forces a fresh sign-in at opauth (step-up).
Responses
Section titled “Responses”Redirect to opauth’s authorization endpoint.
Headers
Section titled “Headers”Opauth’s authorization URL.
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."}