Skip to content

Create setup-token WebAuthn registration options.

POST
/api/admin/setup-token/passkey/options
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/setup-token/passkey/options \
--header 'Content-Type: application/json' \
--data '{ "token": "admin_setup_token_123", "rp_id": "admin.example.com" }'

Validates an Admin UI setup token and returns WebAuthn registration options plus a challenge identifier.

Media type application/json
object
token
required
string
rp_id
required
string
Example
{
"token": "admin_setup_token_123",
"rp_id": "admin.example.com"
}

Successful JSON response.

Media type application/json
object
options
required

WebAuthn options generated by @simplewebauthn/server.

object
key
additional properties
challenge_id
required
string
Example
{
"options": {
"challenge": "challenge",
"rp": {
"name": "Authrim",
"id": "admin.example.com"
},
"user": {
"id": "admin_123",
"name": "[email protected]",
"displayName": "Admin User"
}
},
"challenge_id": "challenge_123"
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}