Skip to content

Start a passkey login

POST
/cms/customer/passkey/login/options
curl --request POST \
--url https://api.example.com/cms/customer/passkey/login/options \
--header 'API-Key: <API-Key>' \
--header 'Content-Type: application/json' \
--data '{ "username": "example" }'

Returns a challenge for navigator.credentials.get() (startAuthentication() of @simplewebauthn/browser). Send the result with the challenge_id to /oauth2/access_token with grant_type=passkey within 5 minutes. Without a username any passkey for this site on the device can be used; with one, only that customer’s passkeys are offered (an unknown username gets options too, so accounts can’t be probed).

Media typeapplication/json
object
username

Customer e-mail or username (optional)

string

Example generated

{
"username": "example"
}

Challenge

Media typeapplication/json
object
challenge_id
string
options

PublicKeyCredentialRequestOptions (JSON, base64url-encoded binary fields)

object

Example generated

{
"challenge_id": "example",
"options": {}
}