Finish passkey registration
Verifies the attestation against the ceremony started by
POST /users/{user_id}/passkeys/registrations and persists the new credential. A
rejected attestation counts against the ceremony's failure budget and the
ceremony stays open for a retry. An expired ceremony surfaces as
att.stale_challenge; an unknown or already-consumed registration id
surfaces as att.not_found.
oauth2 user.writeAuthorizationBearer <token>Scope: user.write
user_id*stringThe unique identifier of the user.
^user_[a-zA-Z0-9_-]+$registration_id*stringThe ceremony identifier returned by begin.
application/json- body
Request to complete a WebAuthn registration ceremony.
attestation*The WebAuthn AttestationResponse object from navigator.credentials.create().
name?stringLabel for the credential in passkey management surfaces. Optional: when omitted, a name is derived from the credential itself.
The passkey was registered
application/json- response
The registered passkey.
id*stringThe unique identifier of the passkey.
name*stringThe name of the passkey.
created_at*stringThe timestamp when the passkey was created.
date-timeimport { createZitadelClient } from "@zitadel/api/client";const client = createZitadelClient({ baseUrl: process.env.ZITADEL_URL ?? "http://localhost:8080", token: process.env.ZITADEL_PROJECT_SECRET!, // server-side only});const userPasskeyRegistration = await client.finishUserPasskeyRegistration( "user_01KWH3B72K7M7F0N9WD3P2E4YM", "att_01J0Z9KX7Y0Q2Y7JX5M9K2YF3C", { attestation: {} },);{ "id": "string", "name": "string", "created_at": "2019-08-24T14:15:22Z"}Was this helpful?