Auth API reference

Auth API · Apps

put/v1/apps/{app_id}/webauthn-configAuth

Set the per-app passkey (WebAuthn) relying-party settings.

Path parameters

app_id*string

Id of the app.

Request body

enabled*boolean

Whether passkey enrollment and passkey sign-in are available for this app. Turning it off leaves existing credentials in place; they simply cannot be used until it is turned back on.

rp_id*string

WebAuthn relying-party id — a bare domain, no scheme or port (`example.com`, not `https://app.example.com`). Must be the host of, or a registrable suffix of the host of, at least one origin in the app auth config's `allowed_redirect_origins`; the browser enforces the same rule client-side, so a mismatch makes the ceremony fail silently in the user's browser. Cannot be changed once any passkey is registered.

Example: "example.com"

rp_namestring

Human-readable name the platform passkey UI shows ("Save a passkey for <rp_name>"). Defaults to `rp_id` when blank.

Example: "Acme"

require_user_verificationboolean

Require the authenticator to verify the user (biometric / PIN) for SECOND-FACTOR ceremonies. Passwordless sign-in always requires it regardless of this flag — a presence-only tap is not an authentication when the passkey is the only credential. Default true.

Response · 200

enabled*boolean

Whether passkeys are on for the app.

rp_id*string

WebAuthn relying-party id (a bare domain), or `null` while passkeys are not configured.

rp_name*string

Name the platform passkey UI shows, or `null` (then `rp_id`).

require_user_verification*boolean

Whether second-factor passkey ceremonies require user verification (biometric or PIN).

ceremony_origins*array

Origins a passkey ceremony will be accepted from: the entries of `allowed_redirect_origins` that `rp_id` actually covers. An EMPTY array while `enabled` is true means the app is misconfigured and every ceremony will be refused with 412 — the usual cause is an `allowed_redirect_origins` edit that dropped the passkey site.

credential_count*number

Number of passkeys currently registered against this app. Non-zero means `rp_id` is frozen: it is hashed into every one of those credentials, so a PUT that changes it is refused with 409. Exposed so an admin UI can say that before the change is attempted rather than after.

Example

Request

PUT https://api.auth.productcraft.co/v1/apps/{app_id}/webauthn-config
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "enabled": false,
  "rp_id": "example.com",
  "rp_name": "Acme",
  "require_user_verification": false
}

Response

{
  "enabled": false,
  "rp_id": "string",
  "rp_name": "string",
  "require_user_verification": false,
  "ceremony_origins": [
    "string"
  ],
  "credential_count": 0
}