Gamma API
AuthenticationPasskeys

Start registering a passkey

GET
/api/auth/passkey/generate-register-options

Generate registration options for a new passkey

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Query Parameters

authenticatorAttachment?string

Type of authenticator to use for registration. "platform" for device-specific authenticators, "cross-platform" for authenticators that can be used across devices.

Value in"platform""cross-platform"
name?string

Optional custom name for the passkey. This can help identify the passkey when managing multiple credentials.

context?string

Optional context for passkey-first registration flows.

Response Body

Success

application/json
  1. response
challenge?string
rp?
user?
pubKeyCredParams?array<>
timeout?number
excludeCredentials?array<>
authenticatorSelection?
attestation?string
extensions?
Example Request
curl -X GET 'http://localhost:3000/api/auth/passkey/generate-register-options'
Example Response
{  "challenge": "string",  "rp": {    "name": "string",    "id": "string"  },  "user": {    "id": "string",    "name": "string",    "displayName": "string"  },  "pubKeyCredParams": [    {      "type": "string",      "alg": 0    }  ],  "timeout": 0,  "excludeCredentials": [    {      "id": "string",      "type": "string",      "transports": [        "string"      ]    }  ],  "authenticatorSelection": {    "authenticatorAttachment": "string",    "requireResidentKey": true,    "userVerification": "string"  },  "attestation": "string",  "extensions": {}}