logIn method
- String? email,
Log in and set the resulting user as the current user.
Implementation
Future<void> logIn({String? email}) async {
if (_logOutFuture != null) await _logOutFuture;
if (_tokenFuture != null) await _tokenFuture;
_logInFuture ??= _runOrHandleTokenError(
() => client.logIn(email: email).then(persistence.setCurrentUser),
).whenComplete(() => _logInFuture = null);
return _logInFuture!;
}