Sign-in · passkeyRegisterOptions
Start adding a passkey
POST /api/auth/passkeys/register/options
WebAuthn creation options for the signed-in account.
- Who may call it
- Anyone (no credentials)
- Server
- https://api.logu.dev
Example#
curl -s -X POST "https://api.logu.dev/api/auth/passkeys/register/options" \
-H "Authorization: Bearer $LOGU_SESSION_TOKEN"
Responses#
200
The ceremony.
{
"options": {
"challenge": "Zk3vQ9…",
"rpId": "logu.dev",
"userVerification": "required"
},
"challengeToken": "aS7dQ2xLp9Vt4mKz.signature"
}
Response fields
| Field | Type | Required | Notes |
|---|---|---|---|
options | object | required | PublicKeyCredentialCreationOptionsJSON / …RequestOptionsJSON. |
challengeToken | string | required | The ceremony's signed challenge reference: send it back with the response. |
Errors#
Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | No credentials, or the API key or session is invalid or revoked. |
| 500 | internal_error | Something went wrong on Logu's side. |