/** * Persisted session. The refresh token is the durable credential; access * token + expiry ride along (when available) so a reload — or a server-side * cookie read — can reuse a still-fresh access token instead of burning a * refresh per hydration (rotation storm under SSR). */ interface PersistedSession { refreshToken: string; accessToken?: string; /** ms epoch */ expiresAt?: number; } interface SessionStorageAdapter { load(): PersistedSession | null; save(session: PersistedSession): void; clear(): void; /** Serialize refresh read/exchange/write across users of this store. */ withLock?(operation: () => Promise): Promise; } declare function memorySessionStorage(): SessionStorageAdapter; declare function localStorageSessionStorage(key?: string): SessionStorageAdapter; export { type PersistedSession as P, type SessionStorageAdapter as S, localStorageSessionStorage as l, memorySessionStorage as m };