curl --request POST \
--url https://{subdomain}.auth.{region}.nhost.run/v1/signup/webauthn/verify \
--header 'Content-Type: application/json' \
--data '
{
"credential": {
"id": "<string>",
"type": "<string>",
"rawId": "aSDinaTvuI8gbWludGxpZnk=",
"response": {
"clientDataJSON": "aSDinaTvuI8gbWludGxpZnk=",
"attestationObject": "aSDinaTvuI8gbWludGxpZnk=",
"transports": [
"<string>"
],
"authenticatorData": "aSDinaTvuI8gbWludGxpZnk=",
"publicKey": "aSDinaTvuI8gbWludGxpZnk=",
"publicKeyAlgorithm": 123
},
"clientExtensionResults": {
"appid": true,
"credProps": {
"rk": true
},
"hmacCreateSecret": true
},
"authenticatorAttachment": "<string>"
},
"options": {
"allowedRoles": [
"me",
"user"
],
"defaultRole": "user",
"displayName": "John Smith",
"locale": "en",
"metadata": {
"firstName": "John",
"lastName": "Smith"
},
"redirectTo": "https://my-app.com/catch-redirection"
},
"nickname": "<string>"
}
'{
"session": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"accessTokenExpiresIn": 900,
"refreshTokenId": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"refreshToken": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"user": {
"avatarUrl": "https://myapp.com/avatars/user123.jpg",
"createdAt": "2023-01-15T12:34:56Z",
"defaultRole": "user",
"displayName": "John Smith",
"emailVerified": true,
"id": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"isAnonymous": false,
"locale": "en",
"metadata": {
"firstName": "John",
"lastName": "Smith"
},
"phoneNumberVerified": false,
"roles": [
"user",
"customer"
],
"email": "[email protected]",
"phoneNumber": "+12025550123",
"activeMfaType": "<string>"
}
}
}Complete the Webauthn sign-up process by verifying the response from the user’s device. Returns a session if validation is successful.
curl --request POST \
--url https://{subdomain}.auth.{region}.nhost.run/v1/signup/webauthn/verify \
--header 'Content-Type: application/json' \
--data '
{
"credential": {
"id": "<string>",
"type": "<string>",
"rawId": "aSDinaTvuI8gbWludGxpZnk=",
"response": {
"clientDataJSON": "aSDinaTvuI8gbWludGxpZnk=",
"attestationObject": "aSDinaTvuI8gbWludGxpZnk=",
"transports": [
"<string>"
],
"authenticatorData": "aSDinaTvuI8gbWludGxpZnk=",
"publicKey": "aSDinaTvuI8gbWludGxpZnk=",
"publicKeyAlgorithm": 123
},
"clientExtensionResults": {
"appid": true,
"credProps": {
"rk": true
},
"hmacCreateSecret": true
},
"authenticatorAttachment": "<string>"
},
"options": {
"allowedRoles": [
"me",
"user"
],
"defaultRole": "user",
"displayName": "John Smith",
"locale": "en",
"metadata": {
"firstName": "John",
"lastName": "Smith"
},
"redirectTo": "https://my-app.com/catch-redirection"
},
"nickname": "<string>"
}
'{
"session": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"accessTokenExpiresIn": 900,
"refreshTokenId": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"refreshToken": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"user": {
"avatarUrl": "https://myapp.com/avatars/user123.jpg",
"createdAt": "2023-01-15T12:34:56Z",
"defaultRole": "user",
"displayName": "John Smith",
"emailVerified": true,
"id": "2c35b6f3-c4b9-48e3-978a-d4d0f1d42e24",
"isAnonymous": false,
"locale": "en",
"metadata": {
"firstName": "John",
"lastName": "Smith"
},
"phoneNumberVerified": false,
"roles": [
"user",
"customer"
],
"email": "[email protected]",
"phoneNumber": "+12025550123",
"activeMfaType": "<string>"
}
}
}WebAuthn credential creation response and optional user profile information
Sign up successful
Container for session information
User authentication session containing tokens and user information
Show child attributes
Was this page helpful?