Exporting Sessions for Server-Side Operations
UseexportSession()
when you need to transfer session state to your server for performing operations on behalf of the user.
By default, the exported session includes user signers which allow for server-side signing. If you don’t need signing capabilities on your server, use the
excludeSigners
option to enhance security.Example Usage
Example client-side export:Importing Sessions
For cases where you need to import a previously exported session back into a Para client instance:Server-Side Implementation
To learn more about handling session on the server, check out the following guide:Server-Side Session Management
Best Practices
- Security-First Approach: When exporting sessions to servers, use
excludeSigners: true
unless server-side signing is explicitly needed - Secure Transmission: Always use HTTPS when transmitting exported sessions to your server
- Session Validation: Verify the session validity on your server before performing any operations