clearSession method

void clearSession()

Clears any active DescopeSession from this manager.

You should call this function as part of a logout flow in the host application. The session property is set to null and the session won't be reloaded in subsequent application launches.

Important: The default DescopeSessionStorage only keeps at most one session in the storage for simplicity. If for some reason you have multiple DescopeSessionManager objects then be aware that unless they use custom storage objects they might clear each other's saved sessions.

Implementation

void clearSession() {
  _session = null;
  lifecycle.session = null;
  storage.removeSession();
}