signOut method

Future signOut()

Implementation

Future signOut() async {
  for (var preLogoutHandler in _preLogout) {
    try {
      await preLogoutHandler();
    } catch (e, stack) {
      log.severe("Error running prelogout handler: $e", e, stack);
    }
  }

  /// Sign out with each provider, in case there is anything cached
  for (final provider in _loginProviders) {
    try {
      provider.signOut();
    } catch (e, stack) {
      log.severe("Error logging out with ${provider.name}", e, stack);
    }
  }

  /// Finally, sign out with Firebase
  await fb.FirebaseAuth.instance.signOut();
}