OAuth hosted login: WebAuthn enrollment options
/oauth/mfa/webauthn/enroll/optionsStep 1 of hosted WebAuthn MFA enrollment: returns the attestation options (and a fresh enrollment_token) as JSON for the browser's navigator.credentials.create(). The subject is derived from the enrollment_token minted by the prior authorize step. Responds with 400 and { error: "expired" } when that token is invalid or expired. Throttled to 5 requests per minute.
Request body
application/json
enrollment_tokenstring Required Responses
application/json
enrollment_token *stringOpaque short-lived (5 min) sealed token carrying the WebAuthn challenge nonce. Must be returned to /mfa/webauthn/enroll/verify exactly.
options *any object`PublicKeyCredentialCreationOptions` JSON to pass to `navigator.credentials.create()`. Shape per the WebAuthn Level 2 spec; key fields: `rp`, `user`, `challenge`, `pubKeyCredParams`, `excludeCredentials`, `authenticatorSelection`.
application/json
error *stringWhat went wrong, for the page to show; `expired` when the session ran out
application/json
error *ApiErrorBodyDto
Rate limit
Returned object
curl -X POST "https://auth.canopy-io.com/oauth/mfa/webauthn/enroll/options" \ -H "Content-Type: application/json" \ -d '{ "enrollment_token": "string" }'
{ "enrollment_token": "string", "options": {} }
Tell us how we can improve this guide.