Skip to content

Begin WebAuthn Login

POST
/api/v1/login/webauthn/begin
curl --request POST \
--url https://api.spartanauth.com/api/v1/login/webauthn/begin \
--header 'Content-Type: application/json' \
--data '{ "username": "example", "transactionID": "example", "sectorID": "example" }'

Starts a passkey login for a user by returning WebAuthn credential request options and a transactionID. Public endpoint; the username and sector identify the account and the transaction is used to verify the browser’s response.

Media type application/json
object
username
optional - required if initializing a new challenge flow
string
transactionID
optional
string
sectorID
string
Example generated
{
"username": "example",
"transactionID": "example",
"sectorID": "example"
}

A successful response.

Media type application/json
object
credentialAssertion
object
publicKey
object
challenge
string
timout
integer format: int32
rpID
string
allowCredentials
Array<object>
object
type
string
id
string
transports
Array<string>
userVerification
string
extensions
object
key
additional properties
string format: byte
transactionID
string
Example generated
{
"credentialAssertion": {
"publicKey": {
"challenge": "example",
"timout": 1,
"rpID": "example",
"allowCredentials": [
{
"type": "example",
"id": "example",
"transports": [
"example"
]
}
],
"userVerification": "example",
"extensions": {
"additionalProperty": "example"
}
}
},
"transactionID": "example"
}

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"
}
]
}