Get WebAuthn registration options
Get WebAuthn registration options for a user
POST
/{apiBasePath}/{tenantId}/webauthn/register/optionsPath parameters
apiBasePathstringrequiredIts value depends on the apiBasePath set by the user
tenantIdstringThe tenant against which the request is made. If left empty, the default tenant will be used.
Header parameters
ridstringThe WebAuthn recipe ID
Request body
application/jsonOne of:
object
emailemailrequiredEmail address
displayNamestringobject
recoverAccountTokenstringrequiredResponses
200WebAuthn registration options
One of:
object
statusstatusOKSuccess status indicator
Allowed:
OKwebauthnGeneratedOptionsIdstringcreatedAtstringexpiresAtstringrpobjectShow propertiesHide properties
idstringnamestringuserobjectShow propertiesHide properties
idstringnamestringdisplayNamestringchallengestringtimeoutnumberexcludeCredentialsobject[]Show propertiesHide properties
Array of
objectidstringtypestringAllowed:
public-keytransportsstring[]attestationstringAllowed:
noneindirectdirectenterprisepubKeyCredParamsobject[]Show propertiesHide properties
Array of
objectalgnumbertypestringauthenticatorSelectionobjectShow propertiesHide properties
requireResidentKeybooleanresidentKeystringAllowed:
requiredpreferreddiscourageduserVerificationstringAllowed:
requiredpreferreddiscouragedgeneralErrorResponse
statusstringError status code
Allowed:
GENERAL_ERRORmessagestringError message
object
statusstringAllowed:
INVALID_OPTIONS_ERRORRECOVER_ACCOUNT_TOKEN_INVALID_ERRORobject
statusstringAllowed:
INVALID_EMAIL_ERRORerrstring404Resource not found error
string500Internal server error
stringTry it
Server
Parameters
Bodyapplication/json
Request
curl -X POST "/auth/public/webauthn/register/options" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"displayName": "John Doe"
}'const response = await fetch("/auth/public/webauthn/register/options", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"email": "[email protected]",
"displayName": "John Doe"
})
});import requests
response = requests.post(
"/auth/public/webauthn/register/options",
headers={
"Content-Type": "application/json"
},
json={
"email": "[email protected]",
"displayName": "John Doe"
},
)Response
{
"status": "OK",
"webauthnGeneratedOptionsId": "opt_123...",
"createdAt": "2024-03-20T10:00:00Z",
"expiresAt": "2024-03-20T10:05:00Z",
"rp": {
"id": "example.com",
"name": "Example Site"
},
"user": {
"id": "user_123...",
"name": "[email protected]",
"displayName": "John Doe"
},
"challenge": "base64challenge...",
"timeout": 300000,
"excludeCredentials": [
{
"id": "string",
"type": "public-key",
"transports": [
"ble"
]
}
],
"attestation": "none",
"pubKeyCredParams": [
{
"alg": -7,
"type": "public-key"
}
],
"authenticatorSelection": {
"requireResidentKey": true,
"residentKey": "required",
"userVerification": "required"
}
}"Not Found""Internal Error"