authenticateWithEmail method
Sign in an existing user using a passkey.
Authentication consists of the following three steps:
- Ask the relying party server for a challenge.
- Ask the
_authenticatorto solve the challenge. - 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);
}