
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
- 404 error when navigating to the team fr...
the version i m running is `1.7.4` as far as i can tell everything is working fine except for this weird bug in the video. when monitoring the appwrite and app...
- Sites 30MB limit from GitHub
I’m deploying a site from github as Other type on the Hobby plan. It is actually a Flutter web app but it’s in a subdirectory with the root being an html landin...
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
