function

memoryTokenStore

Hold a token-transport session in memory, for scripts, tests, and server processes that act as one user. It follows the store contract: a late event for a replaced token is ignored.

Arguments

ArgumentTypeDescription
initial{ token: string; session?: Session | null; } | nullThe initial value.

Returns

The declared result.

SessionTokenStore<Session>

Full signature

function memoryTokenStore<Session = unknown>( initial?: { token: string session?: Session | null } | null, ): SessionTokenStore<Session>

Source packages/sdk/src/index.ts:4

Related types

  • SessionTokenStore

    Holds a token-transport session for a client. The SDK reads token before every request and reports lifecycle events; the store decides where the token lives. Every event names the token it concerns, so a store ignores a late response for a token that is no longer current.