Update recovery method
Once a wallet has been created, users have the ability to upgrade from automatic recovery to a user-owned recovery method, or to switch between different user-owned recovery methods.
Upgrading a user's recovery method#
To update the recovery method, you will need to call the setEmbeddedRecovery
:
_10await openfort.setEmbeddedRecovery({_10 recoveryMethod,_10 recoveryPassword,_10 encryptionSession,_10});
In order to update the recovery method, you will need to request the user for their password.
(Coming soon) Users can reset their password using this method as well.
When calling setEmbeddedRecovery
, then recovery method will be updated to the new method provided. The user won't be required to reconstruct their embedded signer right after.
As an example, you might add setEmbeddedRecovery
as an event handler for a set recovery button in your app: