Managing the lifecycle of authentication sessions in Para
Learn how to check session status, maintain active sessions, and handle session expiration in Para web applications.
Use isSessionActive()
to verify whether a user’s session is currently valid before performing authenticated operations.
Example usage:
Use keepSessionAlive()
to extend an active session’s validity without requiring full reauthentication.
Example usage:
If you’re using the React SDK and the ParaProvider
component, you can leverage automatic session management:
When using the ParaProvider component from the React SDK, it automatically keeps sessions alive in the background by calling keepSessionAlive()
periodically. You can disable this behavior by setting the disableAutoSessionKeepAlive
prop to true
if you prefer to manage sessions manually.
Para provides the refreshSession()
method when a session has expired.
It’s currently recommended to initiate a full authentication flow rather than using refreshSession()
when sessions expire. The refresh flow is being improved in upcoming releases.
For most applications, when a session expires, it’s better to guide users through a complete authentication process:
keepSessionAlive()
or leverage the ParaProvider
automatic session management