Shiba
TypeScript
Future<bool> resetPassword(
ParamsForPassword resetPassword,
String newPassword,
) async {
try {
await account.updateRecovery(
userId: resetPassword.userId,
secret: resetPassword.secret,
password: newPassword,
);
return true;
} on AppwriteException catch (e) {
Utils.toast(e.message ?? "");
Utils.debLog(e);
return false;
}
}
TypeScript
account.createSession(userId: userId, secret: secret)
TypeScript
final user = await account.get();
updateRecovery()
gives me Token in return ;- took the Token.secret
account.createSession(userId: resetPassword.userId, secret: Token.secret)
giving error as Token invalid !!
TL;DR
When resetting a password, developers can create a new session for the user using the token from `updateRecovery()`. To fix the "Token invalid" error, make sure to correctly pass the user ID and corresponding token when creating the session. Recommended threads
- Error: User (role: guests) missing scope...
I want to send a verification code to the user and the given phone number and check it and create a session right after the user entered the secret. For me that...
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...