Complete Passkey registration
POST
/v1/auth/2fa/passkey/register
const url = 'https://api.parasta.io/v1/auth/2fa/passkey/register';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"example","rawId":"example","response":{"attestationObject":"example","clientDataJSON":"example"},"type":"public-key"}'};
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://api.parasta.io/v1/auth/2fa/passkey/register \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "example", "rawId": "example", "response": { "attestationObject": "example", "clientDataJSON": "example" }, "type": "public-key" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
id
required
string
rawId
required
Base64url
string
response
required
object
attestationObject
string
clientDataJSON
string
type
required
string
Responses
Section titled “ Responses ”OK
Media type application/json
object
credentialId
string
enabled
boolean
Example generated
{ "credentialId": "example", "enabled": true}