Start a passkey sign-in.
const url = 'https://api.opdns.io/v1/auth/passkeys/login/begin';const options = { method: 'POST', headers: {'Content-Type': 'application/json'},};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.opdns.io/v1/auth/passkeys/login/begin \ --header 'Content-Type: application/json' \Returns a ceremony id and the options for navigator.credentials.get(). With the
email of an account that has passkeys the options list them
(allowCredentials); without it, and for unknown addresses alike, the ceremony
is discoverable (conditional UI / autofill). The body may be omitted.
Request Body
Section titled “Request Body”object
Examplegenerated
{}Responses
Section titled “Responses”Request options.
object
Echo it to the matching /finish call.
WebAuthn CredentialCreationOptions / CredentialRequestOptions JSON:
pass options.publicKey through PublicKeyCredential.parseCreationOptionsFromJSON
(or parseRequestOptionsFromJSON); binary fields are base64url.
object
object
Examplegenerated
{ "ceremony_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "options": { "publicKey": {}, "mediation": "example" }}Malformed request.
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
Example
{ "type": "https://opdns.io/problems/bad_request", "title": "Bad Request", "status": 400, "code": "bad_request", "detail": "invalid JSON body", "request_id": "5f2c9a0e7b1d4c38"}Rate limited (rate_limited).
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
Example
{ "type": "https://opdns.io/problems/rate_limited", "title": "Too Many Requests", "status": 429, "code": "rate_limited", "detail": "too many requests", "request_id": "5f2c9a0e7b1d4c38", "retry_after": 6}Headers
Section titled “Headers”Passkeys are not configured on this server (passkeys_unavailable).
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
Example
{ "type": "https://opdns.io/problems/passkeys_unavailable", "title": "Service Unavailable", "status": 503, "code": "passkeys_unavailable", "detail": "passkeys are not configured on this server", "request_id": "5f2c9a0e7b1d4c38"}