authenticateWithEmail method

Future<Response?> authenticateWithEmail(
  1. Request request
)

Sign in an existing user using a passkey.

Authentication consists of the following three steps:

  1. Ask the relying party server for a challenge.
  2. Ask the _authenticator to solve the challenge.
  3. Send the solution of the challenge back to the relying party server. For a successful solution the relying party server will respond with Response.

The contents of Response depend on the relying party server (the _backend), but usually it contains some user data (name, email) and some kind of token (e.g. a JWT token).

returns null if the user did cancel the authentication.

Implementation

Future<Response?> authenticateWithEmail(Request request) async {
  final initResponse = await _backend.initAuthenticate(request);
  return _completeSignIn(initResponse);
}