@openvireo/sdk - v0.2.0
    Preparing search index...

    Class TokenManager

    Index
    • Forget the session locally (after logout, or when the server rejected the refresh token).

      Parameters

      Returns Promise<void>

    • A valid access token, refreshing first if it expires within the margin (or force).

      Parameters

      • opts: { force?: boolean } = {}

      Returns Promise<string>

    • Loads a stored session (e.g. at app start). Returns null when signed out.

      Returns Promise<StoredSession | null>

    • Parameters

      Returns () => void

    • Single-flight refresh: concurrent callers share one request.

      Returns Promise<string>

    • After login/register: keep the session and its first access token.

      Parameters

      Returns Promise<void>

    • Changes fields of the stored session, e.g. the email after it changed (SPEC §16).

      Parameters

      Returns Promise<void>