Overview & Key Concepts
The Auth Manager is responsible for managing authentication state and session persistence in your Lit Protocol application. It handles the storage and retrieval of authentication credentials, enabling users to maintain active sessions across page refreshes and application restarts without re-authenticating.What the Auth Manager Stores
When you authenticate with Lit Protocol, the Auth Manager caches critical authentication data locally: Session Key Pair: A temporary cryptographic key pair that represents your current session with Lit Protocol:- Public key - Shared with Lit nodes to identify your session
- Secret key (private key) - Kept securely in local storage, never transmitted
1
Install the SDK
Run the following command to install the SDK and the required
viem peer dependency:viem must be installed as a dependency because the Lit JS SDK does not bundle it.2
Choose Storage Plugin
Choose the appropriate storage plugin based on your environment and requirements, then create your Auth Manager instance.