signOut method
Sign out if you are already signed in.
If you have not yet signed in, an Exception will be thrown.
すでにサインインしている場合サインアウトします。
まだサインインしていない場合Exceptionがスローされます。
Implementation
Future<Authentication> signOut() async {
if (!isSignedIn) {
throw Exception("Not yet signed in.");
}
for (final action in _effectiveActions) {
await action.onSignOut();
}
final userId = this.userId;
await adapter.signOut(onUserStateChanged: notifyListeners);
_sendLog(AuthLoggerEvent.signOut, parameters: {
AuthDatabase.userIdKey: userId,
});
if (!isSignedIn) {
for (final action in _effectiveActions) {
await action.onSignedOut();
}
}
return this;
}