Skip to main content

Overview

Smart Account Kit needs to persist passkey credentials and session data across page loads. It does this through a StorageAdapter interface with three built-in implementations.

Built-in Adapters

Uses the browser’s IndexedDB API. Best for production web apps - supports large payloads and works across tabs.

LocalStorageAdapter

Uses window.localStorage. Simpler fallback for environments where IndexedDB is unavailable.
localStorage has a ~5MB limit and is synchronous. Use IndexedDBStorage in production.

MemoryStorage

Stores credentials in memory only - data is lost on page reload. Use for testing.

Custom Adapter

Implement the StorageAdapter interface to use any backend (e.g. a server-side store, encrypted storage, or React Native AsyncStorage):

What Gets Stored

Session data is cleared by kit.disconnect(). Credentials persist until explicitly deleted via kit.credentials.delete().