invalidateSession method

Future<void> invalidateSession()

Invalidates the current user session, removes local session data, and clears Session token request header in Fetcher. If signInRedirect is specified in ClientOptions when creating the Altogic api client and if the client is running in a browser, redirects the user to the sign in page.

Implementation

Future<void> invalidateSession() async {
  await _deleteLocalData();
  _fetcher.clearSession();
  _singInRedirect?.call();
}