Appearance
Documentation / react-auth / useLinkWithPasskey
Function: useLinkWithPasskey()
useLinkWithPasskey(
callbacks
?):UseLinkWithPasskey
Use this hook to link a passkey to the user, without using any Privy UIs.
Parameters
• callbacks?: Object
• callbacks.onError?: (error
, details
) => void
Callback that will execute in the case of a non-successful account linking.
Param {PrivyErrorCode} - the corresponding error code
Param {LoginMethod} - the type of (attempted) linked account
• callbacks.onSuccess?: (user
, linkMethod
, linkedAccount
) => void
Callback that will execute once on a successful linking of a new account/login method. This will run when any of the 'link' methods are called manually.
ParamUser- the user the account was linked to
Param [LoginMethod]([object Object])- the type of linked account
Param the newly linked account
Returns
linkWithPasskey - [linkWithPasskey]([object Object]) - links a passkey to a user
state - PasskeyFlowState - the current state of the passkey link operation