authenticateEmail method
Future<Session>
authenticateEmail({
- required String email,
- required String password,
- bool create = true,
- String? username,
- Map<
String, String> ? vars,
override
Implementation
@override
Future<model.Session> authenticateEmail({
required String email,
required String password,
bool create = true,
String? username,
Map<String, String>? vars,
}) async {
final request = AuthenticateEmailRequest()
..create_2 = BoolValue(value: create)
..account = (AccountEmail()
..email = email
..password = password
..vars.addAll(vars ?? {}));
if (username != null) {
request.username = username;
}
final res = await _client.authenticateEmail(request);
return model.Session(
created: res.created,
token: res.token,
refreshToken: res.refreshToken,
);
}