Verify the browser's attestation and persist the credential (403 on any ceremony failure, 409 on an already-registered credential id)
const url = 'https://example.com/v1/auth/webauthn/register';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"credential":{},"name":"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://example.com/v1/auth/webauthn/register \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "credential": {}, "name": "example" }'Verifies the browser’s attestation against the issued challenge and persists the credential; 409 when the credential id is already registered.
Authorizations
Section titled “ Authorizations ”Request Body required
Section titled “ Request Body required ”object
The browser’s encoded ceremony response.
object
Optional user-supplied display name for the credential.
Example generated
{ "credential": {}, "name": "example"}Responses
Section titled “ Responses ”OK
object
Example generated
{ "ok": true}Bad request
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Unauthenticated
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Forbidden
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Not found
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Conflict / setup required
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Rate limited
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}