@me2em/react
    Preparing search index...

    Interface IdentityContextStorage

    interface IdentityContextStorage {
        open(identityId: string): Promise<void>;
        save(data: IdentityContextData): Promise<void>;
        load(): Promise<IdentityContextData | null>;
        clear(): Promise<void>;
        close(): Promise<void>;
        openAndLoad(identityId: string): Promise<IdentityContextData | null>;
        setCacheKey(key: CryptoKey): void;
        getCacheKey(): CryptoKey | null;
        persistCacheKey(): Promise<void>;
        loadPersistedKey(): Promise<CryptoKey | null>;
    }

    Implemented by

    Index
    • Closes the IDB connection. Caller-owned lifecycle (R5): close() also drops the in-memory cache key and the open identity binding, so every further operation throws "Storage not opened" until the storage is reopened via open()/openAndLoad() and the cache key is set again. open() with a different identityId closes the previous connection automatically; same-identity open() after close() simply opens a fresh connection.

      Returns Promise<void>