Session Storage
This guide covers session persistence so users don’t need to re-authenticate on every visit. For the conceptual overview of key sources and persistence, see Key Management.Built-In Persistence
Configure at SDK initialization. The SDK handles encryption, storage, and retrieval automatically:unlock is pin or password, authenticate() returns credentialRequired so you can prompt the user. See Authentication — PIN / Password Unlock.
Session State
Check current auth state locally:Logout
| Method | What it does | Next login |
|---|---|---|
clearSession() | Clears the auth token but keeps keys in memory | Fast — no wallet popups |
logout() | Clears everything (keys, token, connection) | Full re-auth with wallet popups |
Next Steps
- Error Handling — Error codes, retry patterns, and performance
- Key Management — Key sources, persistence options, and recovery
- Authentication — Auth flow, token providers, and login methods