
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
- Subject: Request for temporary quota lif...
Hi Appwrite Team, our nonprofit animal rescue app on Appwrite Cloud is currently throttled due to read‑quota limits, and we need a temporary increase so rescue ...
- Images not showing up --
so i made this movie app - i hosted it successfully using appwrite but the images arent showing up --- https://movie-app-jsm.appwrite.network/ this is the movie...
- What’s the current approach for always o...
Read that it’s not a thing out of the box, but what’s the possible setup here?
