PortalAuth method. Removes the session persisted for this authEnvironmentId, and forgets the grant handleRedirect last exchanged and any two-factor session still waiting to be written, so neither a redirect re-delivered after sign-out nor a repeated verifyTotp can bring back the session that was just cleared.
Throws
PortalAuthError.sessionStorageFailure(message:): The Keychain delete failed.
- Call it on sign-out, alongside
portal.clearSession(), and from youronSessionInvalidatedlistener.Portal.clearSession()invalidates the credential thePortalholds but does not reachPortalAuth’s memory of the last grant it exchanged. - It is not a sign-out on its own. It does not affect a
Portalthat already holds the session (there is no server-side revoke); it prevents a futurerestoreSession()from returning it. Useportal.clearSession()for the live instance. - Waits for an in-flight
handleRedirectorverifyTotpto finish persisting before deleting, so a sign-in cannot write a session back after the delete. - Keychain items survive app deletion, so calling this on the first launch after install gives a fresh install a clean slate.
- Available starting from SDK version 8.0.0.