Get passkey assertion options for sign-in
curl --request POST \
--url https://my.server.express/api/v1/auth/2fa/options \
--header 'Content-Type: application/json' \
--data '
{
"preAuthToken": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({preAuthToken: '<string>'})
};
fetch('https://my.server.express/api/v1/auth/2fa/options', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/auth/2fa/options"
payload = { "preAuthToken": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"challenge": "<string>",
"timeout": 123,
"rpId": "<string>",
"allowCredentials": [
{
"id": "<string>",
"type": "public-key",
"transports": [
"<string>"
]
}
],
"userVerification": "preferred",
"extensions": {}
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Auth
Get passkey assertion options for sign-in
First half of the passkey second factor. Exchanges the pre-auth token for WebAuthn authentication options (from @simplewebauthn/server) covering every passkey on the account, and stores the challenge server-side for /v1/auth/2fa/verify. Pass data straight to startAuthentication(). Not rate-limited.
POST
/
v1
/
auth
/
2fa
/
options
Get passkey assertion options for sign-in
curl --request POST \
--url https://my.server.express/api/v1/auth/2fa/options \
--header 'Content-Type: application/json' \
--data '
{
"preAuthToken": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({preAuthToken: '<string>'})
};
fetch('https://my.server.express/api/v1/auth/2fa/options', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/auth/2fa/options"
payload = { "preAuthToken": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"challenge": "<string>",
"timeout": 123,
"rpId": "<string>",
"allowCredentials": [
{
"id": "<string>",
"type": "public-key",
"transports": [
"<string>"
]
}
],
"userVerification": "preferred",
"extensions": {}
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}