Auth API reference

Auth API · Consumer-Auth

post/{app_slug}/v1/auth/passkey/options

Begin a passwordless passkey sign-in

Returns a single-use WebAuthn challenge for `navigator.credentials.get()`. `allowCredentials` is ALWAYS empty and the response is shaped identically for every caller: this endpoint does not take an identifier and does not look one up, because returning a credential list for a registered address and an empty list for an unregistered one would be a single-request account-existence oracle. Sign-in therefore requires a discoverable (resident) credential — the authenticator finds its own passkey for the relying-party id. Submit the result to `/auth/passkey/verify`.

Path parameters

app_slug*string

Slug of the app.

Request body

tenant_idstring · uuid

Optional tenant to activate on the session the ceremony will mint, same semantics as `tenant_id` on `/auth/signin`.

Response · 200 Assertion options. Single-use, 5-minute TTL.

public_key*object

The `publicKey` member to hand to `navigator.credentials.get()` verbatim. Single-use; 5-minute TTL.

Example

Request

POST https://api.auth.productcraft.co/{app_slug}/v1/auth/passkey/options
Content-Type: application/json

{
  "tenant_id": "00000000-0000-0000-0000-000000000000"
}

Response

{
  "public_key": {}
}