Logout
There are two ways to log out from the SDK:
Hard Logout (default): This option clears sessions from both the SDK (local) and the browser used for login. During the logout process, a browser is opened to clear the browser session.
Once the browser session is cleared, the browser redirects to the
logoutRedirectUri
that was configured during Passport initialisation. If nologoutRedirectUri
is specified, the SDK will default to using the logout redirect URI configured in the Immutable Hub client settings.Soft Logout: This option clears only the SDK's local session without affecting the browser session. No browser is opened during the process. To use soft logout, set the
hardLogout
parameter tofalse
. However, keep in mind that with this option, gamers will remain logged in to Passport in the browser until their session expires.
- Device Code Authorisation
- PKCE (Recommended for Android, iOS and macOS)
await passport.Logout(/* hardLogout: true */);
await passport.LogoutPKCE(/* hardLogout: true */);