Finish WebAuthn Login
POST
/api/v1/login/webauthn/finish
const url = 'https://api.spartanauth.com/api/v1/login/webauthn/finish';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"username":"example","id":"example","type":"example","rawID":"example","clientExtensionResults":{"additionalProperty":"example"},"response":{"clientDataJSON":"example","authenticatorData":"example","signature":"example","userHandle":"example"},"transactionID":"example","sectorID":"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/login/webauthn/finish \ --header 'Content-Type: application/json' \ --data '{ "username": "example", "id": "example", "type": "example", "rawID": "example", "clientExtensionResults": { "additionalProperty": "example" }, "response": { "clientDataJSON": "example", "authenticatorData": "example", "signature": "example", "userHandle": "example" }, "transactionID": "example", "sectorID": "example" }'Verifies the browser’s WebAuthn assertion for the transaction and issues a JWT for the user on success. Public endpoint and must be called with the transactionID returned by the begin step.
Request Body
Section titled “Request Body ” Media type application/json
object
username
optional - required if initializing a new challenge flow
string
id
string
type
string
rawID
string format: byte
clientExtensionResults
object
key
additional properties
string format: byte
response
object
clientDataJSON
string format: byte
authenticatorData
string format: byte
signature
string format: byte
userHandle
string format: byte
transactionID
optional
string
sectorID
string
Example generated
{ "username": "example", "id": "example", "type": "example", "rawID": "example", "clientExtensionResults": { "additionalProperty": "example" }, "response": { "clientDataJSON": "example", "authenticatorData": "example", "signature": "example", "userHandle": "example" }, "transactionID": "example", "sectorID": "example"}Responses
Section titled “ Responses ”A successful response.
Media type application/json
object
transactionID
string
status
string
challengeType
string
token
string
Example
{ "status": "SUCCESS"}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" } ]}