/{app_slug}/v1/auth/passkey/optionsBegin 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*stringSlug of the app.
Request body
tenant_idstring · uuidOptional 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*objectThe `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"
}import { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const consumerWebauthnOptions = await auth.consumer("my-app").passkey.options({ tenant_id: "9b2f6c1e-0d6a-4a63-9a43-2f1c3e4d5a6b" });auth.consumer(…).passkey.options(params?, options?): Auth.ConsumerWebauthnOptions
Response
{
"public_key": {}
}