---
title: "Verify a passkey assertion and issue a session"
method: POST
path: "/auth/passkey/verify-auth"
tags: ["Auth"]
---

# Verify a passkey assertion and issue a session

`POST /auth/passkey/verify-auth`

## Request

- Base URL: `https://api.mnemom.ai/v1`
- URL: `https://api.mnemom.ai/v1/auth/passkey/verify-auth`
- Auth: none required

Unauthenticated. Consumes the challenge issued by `/auth/passkey/challenge`, verifies the assertion via `@simplewebauthn/server`, mints Supabase tokens via `admin.generateLink(magiclink)` for the resolved user (same pattern T3-2c uses for SSO identity linking), and issues `mnemom_session` with `auth_method: 'passkey'`. Counter is enforced monotonically — a decrement rejects the assertion. A passkey is a non-SSO credential: if the user's email domain belongs to an org that enforces SSO, no session is minted and the response is 403 `sso_required`; if that check cannot be completed (including when the user's email cannot be resolved) the response is 503 `sso_check_unavailable`.

## Request body

- object
  - `response` AuthenticationResponseJSON, required: Browser's `navigator.credentials.get()` response, JSON-serialized.
    - `id` string, required
    - `rawId` string, required
    - `type` 'public-key', required
    - `response` object, required
    - `clientExtensionResults` object
    - `authenticatorAttachment` string

## Response `200`

Session issued.

- object
  - `user` User: Supabase user shape. Fields beyond `id` and `email` are passthrough.
    - `id` string, uuid
    - `email` string, email
    - `app_metadata` object
    - `user_metadata` object

## Other responses

- `400`: Bad request
- `403`: Forbidden
- `404`: Resource not found
- `429`: Rate-limit exceeded. The global per-IP limiter (100 requests/minute, applied to every `/v1/*` route) rejected this request. Back off until the window resets — `Retry-After` carries the cooldown in seconds and `X-RateLimit-Reset` the absolute reset time.
- `500`: Server error — request was well-formed but the server failed to fulfill it. Typically a downstream dependency (DB / RPC / external API) returned an unexpected error.
- `502`: An upstream dependency returned an invalid response.
- `503`: An upstream dependency is currently unavailable. The request was not processed; retry after the cooldown window.

---

[API](https://skmtc.dev/mnemom/apis/mnemom-api.md) · [All operations](https://skmtc.dev/mnemom/apis/mnemom-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mnemom/apis/mnemom-api/revisions/274b7a6ea182?raw)
