Start a passkey login
POST
/cms/customer/passkey/login/options
const url = 'https://api.example.com/cms/customer/passkey/login/options';const options = { method: 'POST', headers: {'API-Key': '<API-Key>', 'Content-Type': 'application/json'}, body: '{"username":"example"}'};
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.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).
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
username
Customer e-mail or username (optional)
string
Example generated
{ "username": "example"}Responses
Section titled “Responses”Challenge
Media typeapplication/json
object
challenge_id
string
options
PublicKeyCredentialRequestOptions (JSON, base64url-encoded binary fields)
object
Example generated
{ "challenge_id": "example", "options": {}}