Guide to managing authentication sessions in Para for Swift applications
ParaSessionState
enum:
unknown
: Initial state before the status is determined.inactive
: SDK initialized but no active session.active
: Session is active but user not fully logged in.activeLoggedIn
: User is fully logged in with an active session.2 hours
by default, but can be configured to up to 30 days. To configure this parameter, please visit the Configuration section of the . A user signing a message or transaction extends the session by the duration of the session length.
isSessionActive() async throws -> Bool
: Checks if the session is currently valid before performing authenticated operations.isFullyLoggedIn() async throws -> Bool
: Checks if the user is fully logged in with an active session.exportSession() async throws -> String
: Exports session state as a string that can be used for advanced integration scenarios.logout() async throws
: Clears the current session, removes all website data from the WebView, and resets the session state to inactive.logout()
before reinitiating authentication when a session has expired to ensure all stored data is properly cleared.