Enroll auth factors for new devices
Set user-controlled recovery on the embedded wallet, and to attach callbacks to the wallet’s recovery events.
To prompt users to enroll an auth factor for new devices for their wallet, use the setWalletRecovery
method from the useSetWalletRecovery
hook:
When invoked, this method will open a modal where the user can enroll an auth factor for new devices from the options (password, iCloud, Google Drive) you configured in the Dashboard.
Usage
Parameters
This method takes no parameters.
Returns
This method returns a Promise
that resolves if the user successfully enrolls an auth factor, and rejects if there is an error.
Callbacks
You can optionally register an onSuccess or onError callback on the useSetWalletRecovery hook.
Usage
Optional callback to run after a user successfully enrolls an auth factor.
Optional callback to run after there is an error during wallet recovery.
To prompt users to enroll an auth factor for new devices for their wallet, use the setWalletRecovery
method from the useSetWalletRecovery
hook:
When invoked, this method will open a modal where the user can enroll an auth factor for new devices from the options (password, iCloud, Google Drive) you configured in the Dashboard.
Usage
Parameters
This method takes no parameters.
Returns
This method returns a Promise
that resolves if the user successfully enrolls an auth factor, and rejects if there is an error.
Callbacks
You can optionally register an onSuccess or onError callback on the useSetWalletRecovery hook.
Usage
Optional callback to run after a user successfully enrolls an auth factor.
Optional callback to run after there is an error during wallet recovery.
To prompt users to enroll an auth factor for new devices for their wallet, use the setEmbeddedWalletRecovery
method from the useSetWalletRecovery
hook:
Usage
Parameters
This method accepts an object as a parameter with the following fields.
The recovery method (auth factor) to enroll for the wallet.
Password to set on the wallet. Only valid if recoveryMethod
is 'password'
.
Returns
This method returns a Promise
that resolves if the user successfully enrolls an auth factor, and rejects if there is an error.