Skip to main content

Function Signature

Description

A PortalAuth method. Returns the session persisted on this device for the configured auth environment, so a returning user does not sign in again. It makes no network call, so a session that has expired is only discovered on its first use, through onSessionInvalidated. null means “not signed in”, including a stored session the SDK can never read again, which it clears for you. On iOS, Keychain items survive app deletion, so a reinstalled app can find the previous install’s session. See Start a fresh iOS install from a clean slate. Available starting from portal_flutter 2.0.0.

Parameters

This method takes no parameters.

Returns

PortalSession? - The persisted session, or null when there is none. Pass it to Portal().initialize(session:).

Example

Errors