clearAuthentication method

Future<void> clearAuthentication()

Implementation

Future<void> clearAuthentication() async {
  logger("clearAuthentication() called");
  if (_authStatus == AuthStatus.authenticated) {
    await AsklessClient.instance.delete(route: "askless-internal/authentication");
  }
  _shouldBeAuthenticated = false;
  _credential = null;
  _claims = null;
  _userId = null;
  _authStatus = AuthStatus.notAuthenticated;
  _invalidateWaitForAuthentication();
  getIt.get<RequestsService>().clear();
}