signOut method

Future<void> signOut()

Signs out the current user.

Performs sign out and clears persistence.

Returns a Future that completes when signed out.

Example:

await auth.signOut();

Implementation

Future<void> signOut() async {
  await _initFuture;
  try {
    await _authHelper.performSignOut(currentUser?.refreshToken);
  } finally {
    try {
      await __removeCredTokens();
    } finally {
      __updateCurrentUser(null);
      _syncLogoutPersistence();
    }
  }
}