Web Developer
I'm developping in flutter/dart, I'm using email token to login to an existing user:
_sessionToken = await account.createEmailToken(userId: app.ID.unique(), email: email);
_session = await account.createSession(userId: _sessionToken.userId, secret: pin);
Then, to set a new passwordI'm using:
_currentUser = await account.updatePassword(password: newPassword, oldPassword: null);
But I'm always getting an error: AppwriteException: user_invalid_credentials, Invalid credentials. Please check the email and password. (401)
Is it supposed to work this way, if yes what I'm doing wrong, if no,, it means there is no way to recover an account using an e-mail token ?