login method
Logs in the user and returns a new session.
Throws an EmailAccountLoginException in case of errors, with reason:
- EmailAccountLoginExceptionReason.invalidCredentials if the email or password is incorrect.
- EmailAccountLoginExceptionReason.tooManyAttempts if there have been too many failed login attempts.
Throws an AuthUserBlockedException if the auth user is blocked.
Implementation
Future<AuthSuccess> login(
final Session session, {
required final String email,
required final String password,
}) async {
return emailIdp.login(
session,
email: email,
password: password,
);
}