-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Description
In my Recover page, I have a function component that takes the user password. This is given that the token is catched from runRoutes
. I basically followed the implementation recovery action guide from here.
The thing that I can't figure out is whether recoverAccount
and updateUser
is the way to go? Problem is updateUser
fails.
recoverAccount(true)
.then((userFromToken) => {
console.log("userFromToken", userFromToken);
// --> This doesn't work. It says, user is not logged in.
updateUser({ password })
.then((updatedUser) => {
setFormState("user_updated");
console.log("Updated user %s", updatedUser);
})
.catch((error) => {
console.log("Failed to update user: %o", error);
});
})
.catch((error) => {
console.log(error);
});
Alternatively, I used verifyToken
and setUser
which is not recommended. The same updateUser
function call doesn't seem to work.
Metadata
Metadata
Assignees
Labels
No labels