Finish WebAuthn Registration
POST
/api/v1/webauthn/registration/finish
const url = 'https://api.spartanauth.com/api/v1/webauthn/registration/finish';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"transactionID":"example","ID":"example","PublicKey":"example","AttestationType":"example","AAGUID":"example","SignCount":1,"CloneWarning":true,"rawId":"example","clientExtensionResults":{"additionalProperty":"example"},"response":{"clientDataJSON":"example","attestationObject":"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://api.spartanauth.com/api/v1/webauthn/registration/finish \ --header 'Content-Type: application/json' \ --data '{ "transactionID": "example", "ID": "example", "PublicKey": "example", "AttestationType": "example", "AAGUID": "example", "SignCount": 1, "CloneWarning": true, "rawId": "example", "clientExtensionResults": { "additionalProperty": "example" }, "response": { "clientDataJSON": "example", "attestationObject": "example" } }'Completes WebAuthn passkey registration using the credential attestation returned by the browser. Requires the authenticated user and the transactionID from the begin step.
Request Body
Section titled “Request Body ” Media type application/json
object
transactionID
optional
string
ID
Credential
string format: byte
PublicKey
string format: byte
AttestationType
string
AAGUID
Authenticator
string format: byte
SignCount
integer format: int32
CloneWarning
boolean
rawId
string format: byte
clientExtensionResults
object
key
additional properties
string format: byte
response
object
clientDataJSON
string format: byte
attestationObject
string format: byte
Example generated
{ "transactionID": "example", "ID": "example", "PublicKey": "example", "AttestationType": "example", "AAGUID": "example", "SignCount": 1, "CloneWarning": true, "rawId": "example", "clientExtensionResults": { "additionalProperty": "example" }, "response": { "clientDataJSON": "example", "attestationObject": "example" }}Responses
Section titled “ Responses ”A successful response.
Media type application/json
object
sub
string
type
string
Example generated
{ "sub": "example", "type": "example"}default
Section titled “default ”An unexpected error response.
Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}