resetEmailPassword 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>> resetEmailPassword({
/// Email of the user to reset password
required String email,
}) async {
Account account = Account(_client);
try {
final models.Token token = await account.createRecovery(
email: email,
url: _recovery ?? _client.endPoint,
);
_token = token;
return token.toMap();
} on AppwriteException catch (e) {
return {
'error': true,
'type': e.type,
'message': e.message,
'code': e.code,
};
}
}