otpLogin property

EmailIdpOtpLoginUtil otpLogin
latefinal

This class contains utility functions for passwordless logins with a one-time password (OTP) sent to the user's email.

The flow is:

  1. startOtpLogin creates a login request and sends a one-time password to the email, regardless of whether an account is registered for it.
  2. verifyOtpLoginCode verifies the one-time password and returns a token together with whether an account exists for the email.
  3. Either completeOtpLogin signs in the existing account, or completeOtpRegistration creates a new account for the verified email.

Errors are reported with the same EmailAccountRequestServerException subclasses as the registration flow.

Implementation

late final EmailIdpOtpLoginUtil otpLogin;