signOutDevice method

Future<void> signOutDevice()

Implementation

Future<void> signOutDevice() async {
  // Best-effort server-side session revoke before clearing local state.
  if (token != null && _revokeSession != null) {
    try {
      await _revokeSession();
    } on Object {
      // Local logout must succeed even if the network call fails.
    }
  }
  token = null;
  signedInUser = null;
  await auth_storage.clearAuthSession(_storageKey);
}