Skip to content

Begin WebAuthn Registration

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

Generates WebAuthn credential creation options for the authenticated user and stores the WebAuthn session in a transaction. Requires a valid bearer token and returns the transactionID needed to finish registration.

Media type application/json
object
transactionID
optional
string
sectorID
string
keyName
string
Example generated
{
"transactionID": "example",
"sectorID": "example",
"keyName": "example"
}

A successful response.

Media type application/json
object
options
object
challenge
string
rp
object
name
string
icon
string
id
string
user
object
name
string
icon
string
displayName
string
id
string
pubKeyCredParams
Array<object>
object
type
string
alg
integer format: int32
authenticatorSelection
object
authenticatorAttachment
string
requireResidentKey
boolean
residentKey
string
userVerification
string
timeout
integer format: int32
excludeCredentials
Array<object>
object
type
string
id
string
transports
Array<string>
extensions
object
key
additional properties
string format: byte
attestation
string
transactionID
optional
string
sectorID
string
Example generated
{
"options": {
"challenge": "example",
"rp": {
"name": "example",
"icon": "example",
"id": "example"
},
"user": {
"name": "example",
"icon": "example",
"displayName": "example",
"id": "example"
},
"pubKeyCredParams": [
{
"type": "example",
"alg": 1
}
],
"authenticatorSelection": {
"authenticatorAttachment": "example",
"requireResidentKey": true,
"residentKey": "example",
"userVerification": "example"
},
"timeout": 1,
"excludeCredentials": [
{
"type": "example",
"id": "example",
"transports": [
"example"
]
}
],
"extensions": {
"additionalProperty": "example"
},
"attestation": "example"
},
"transactionID": "example",
"sectorID": "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"
}
]
}