コンテンツにスキップ

Create WebAuthn registration options.

POST
/api/auth/passkeys/register/options
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/auth/passkeys/register/options \
--header 'Content-Type: application/json' \
--data '{ "email": "[email protected]", "name": "Example User" }'
Media type application/json
object
email
required
string format: email
name
string
custom_fields
object
key
additional properties
Example
{
"email": "[email protected]",
"name": "Example User"
}

Successful JSON response.

Media type application/json
object
options
required

WebAuthn options generated by @simplewebauthn/server.

object
key
additional properties
userId
required
string
Example
{
"options": {
"challenge": "challenge",
"rp": {
"name": "Authrim",
"id": "auth.example.com"
},
"user": {
"id": "user_123",
"name": "[email protected]",
"displayName": "Example User"
},
"pubKeyCredParams": []
},
"userId": "user_123"
}