Register a FIDO device for the current user. First, prepare the registration. Then, send the response of the device. When the user already has a second factor, give one of them too (totp, email_otp, fido_authentication_response or recovery_code).
POST
/auth/fido
curl
curl -X POST "http://api.example.com/auth/fido" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"registration_response": {},
"device_name": ""
}'
import requests
url = "http://api.example.com/auth/fido"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json",
"Content-Type": "application/json"
}
params = {}
payload = {
"registration_response": {},
"device_name": ""
}
response = requests.post(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
Request examples
{
"registration_response": {},
"device_name": "string",
"totp": "string",
"email_otp": "string",
"fido_authentication_response": {},
"recovery_code": "string"
}