@synonymdev/pubky
    Preparing search index...

    Class BrowserSessionStore

    Browser-backed durable store for completed grant sessions.

    Index
    • Returns void

    • Clear all local stored session records for this origin.

      Delegated keys referenced by those stored session records are removed. Delegated keys that only belong to pending grant flows are preserved.

      Returns Promise<void>

    • Clear all browser auth persistence owned by this SDK origin.

      This removes all stored session records and all browser-held delegated grant keys, including keys for pending delegated grant flows. Saved delegated flow state becomes unrestorable. This does not revoke remote grants. Browser-managed handles stop working when their saved record is removed.

      Returns Promise<void>

    • Returns void

    • Whether IndexedDB and Web Locks are available.

      Returns Promise<boolean>

    • Remove local stored session metadata and any SDK-owned delegated key for that record.

      Parameters

      • id: string

      Returns Promise<void>

    • Restore a specific stored session by id.

      Shares one bearer with other tabs on this origin. Requires IndexedDB and Web Locks in a secure browser context.

      Parameters

      • id: string

      Returns Promise<Session>

    • Recover a stored session's encryption keys without network access. Verifies the signed approval, exact grant binding, and requested session identity. Works after grant expiry/revocation and without the delegated WebCrypto signing key. Restore material is stored as plaintext in IndexedDB. Bare-grant records return undefined; signed approvals without e scopes return an empty bundle. Creates no session.

      Parameters

      • id: string

      Returns Promise<EncryptionKeys | undefined>

    • Persist a completed grant session and its optional signed approval. Confidential restore material is stored as plaintext in IndexedDB. Delegated signing keys remain non-extractable WebCrypto keys. Records are identified by user and grant ID. Reauthorizing the same client creates a separate record; use the returned ID to restore it.

      Parameters

      Returns Promise<StoredSessionInfo>