Package: react-wallet-kit
Defined in: react-wallet-kit/src/providers/client/Types.tsx:621
Overview
Handles the addition of a passkey (authenticator) for the user.- This function opens a modal-driven flow for adding a new passkey authenticator (WebAuthn/FIDO2) to the user’s account.
- If a
nameordisplayNameis provided, those will be used for the passkey metadata; otherwise, defaults are generated based on the website and timestamp. - The passkey is created and linked to the specified user (by
userId) or the current session’s user if not provided. - After successful addition, a success page is shown for the specified duration (or skipped if
successPageDurationis 0). - Supports stamping the request with a specific stamper (
StamperType.Passkey,StamperType.ApiKey, orStamperType.Wallet) for granular authentication control. - Automatically refreshes the user details state after successful addition to ensure the latest authenticators list is available in the provider.
- Handles all error cases and throws a
TurnkeyErrorwith appropriate error codes.
Parameters
Response
A successful response returns the following fields:A promise that resolves to the user’s updated passkeys.