resetPassword static method
Returns a map with the following keys: if there was no error:
token:Tokenfrom Appwrite if there was an error:error:trueif there was an errortype:errorif there was an errormessage:Stringcontaining the error messagecode:intcontaining the error code
Implementation
static Future<Map<String, dynamic>> resetPassword({
/// User ID
required String userId,
/// Secret token
required String secret,
/// Password for the email
required String password,
/// Password confirmation for the email
required String passwordAgain,
}) async {
try {
final models.Token token = await _account.updateRecovery(
userId: _token!.userId,
secret: _token!.secret,
password: password,
passwordAgain: passwordAgain,
);
return token.toMap();
} on AppwriteException catch (e) {
return {
'error': true,
'type': e.type,
'message': e.message,
'code': e.code,
};
}
}