Skip to main content

Function Signature

Description

Signs out the Client Auth session Portal was initialized with. It drops the in-memory token, deletes the persisted copy, and returns Portal to uninitialized: call initialize(session:) with the session from the next sign-in before using Portal again. It does not emit on onSessionInvalidated, and does not revoke anything server-side: the token stays valid until the backend expires it. The wallet’s signing shares are not touched. A no-op when Portal was initialized with an API key, or is not initialized. Pair it with PortalAuth().clearPersistedSession(), and run that even when clearSession() throws, so the next launch cannot restore the session. Available starting from portal_flutter 2.0.0.

Parameters

This method takes no parameters.

Returns

Future<void> - Completes once the session is cleared.

Example

Errors