otpLogin property
This class contains utility functions for passwordless logins with a one-time password (OTP) sent to the user's email.
The flow is:
startOtpLogincreates a login request and sends a one-time password to the email, regardless of whether an account is registered for it.verifyOtpLoginCodeverifies the one-time password and returns a token together with whether an account exists for the email.- Either
completeOtpLoginsigns in the existing account, orcompleteOtpRegistrationcreates a new account for the verified email.
Errors are reported with the same EmailAccountRequestServerException subclasses as the registration flow.
Implementation
late final EmailIdpOtpLoginUtil otpLogin;