Enclave API Documentation
  • Welcome
  • Getting Started
    • Integrations
  • SDK
  • Integrating with Privy
  • Models
    • Passkey Models
    • Transaction Models
    • User Model
    • Smart Balance
  • API Reference
    • Health Check
    • User Details
    • Smart Balance
    • Smart Account Creation
    • Smart Account Transactions
    • Passkey Account Creation
    • Passkey Account Authentication
    • Passkey Account Transactions
    • Session Key
  • COMING SOON
    • SDKs
    • Network Support
    • Protocol Integration
    • Mobile Integration
    • Custom Integration
Powered by GitBook
On this page
  1. API Reference

Passkey Account Authentication

Smart accounts with passkey as primary signer

PreviousPasskey Account CreationNextPasskey Account Transactions

Last updated 10 months ago

  • GETGenerate authentication options
  • POSTVerify authentication

Generate authentication options

get

Generate authentication options for a user

Query parameters
usernamestringRequired

The username of the user

Responses
200
Authentication options generated successfully
application/json
400
User not registered
500
Internal server error
get
GET /webauthn/authenticate/generate-options?username=text HTTP/1.1
Host: 
Accept: */*
{
  "passkeyAuthenticationOptions": {}
}

Verify authentication

post

Verify the authentication for a user

Query parameters
usernamestringRequired

The username of the user

Body
idstringOptional
rawIdstringOptional
authenticatorAttachmentstringOptional
clientExtensionResultsobjectOptional
typestringOptional
Responses
200
Authentication verified successfully
application/json
400
User not found or Device Info not found
500
Internal server error
post
POST /webauthn/authenticate/verify?username=text HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 186

{
  "id": "text",
  "rawId": "text",
  "response": {
    "attestationObject": "text",
    "clientDataJSON": "text",
    "signature": "text"
  },
  "authenticatorAttachment": "text",
  "clientExtensionResults": {},
  "type": "text"
}
{
  "message": "text"
}