signIn method
Future
signIn(
{ - bool reAuthenticate = false,
- bool suppressErrors = true,
- bool silentOnly = false,
})
Implementation
@override
Future signIn({
bool reAuthenticate = false,
bool suppressErrors = true,
bool silentOnly = false,
}) async {
var debugPrefix = '$runtimeType.signIn()';
lazy.log(debugPrefix, forced: debugLog);
try {
lazy.log('$debugPrefix:_api.signInSilently()', forced: debugLog);
await _api
.signInSilently(
reAuthenticate: reAuthenticate, suppressErrors: suppressErrors)
.onError((e, _) => throw ('_api.signInSilently():$e'));
// Sign-in silently failed -> try pop-up
if (_api.currentUser == null && !silentOnly) {
lazy.log('$debugPrefix:_api.signIn()', forced: debugLog);
await _api.signIn().onError((e, _) => throw ('_api.signIn():$e'));
}
} catch (e) {
throw '$debugPrefix:catch:$e';
}
}