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
| Argument | Type | Description |
|---|---|---|
initial | { token: string; session?: Session | | The initial value. |
Returns
The declared result.
SessionTokenStore<Session>Full signature
function memoryTokenStore<Session = unknown>(
initial?: {
token: string
session?: Session | null
} | null,
): SessionTokenStore<Session>Related types
SessionTokenStoreHolds a token-transport session for a client. The SDK reads
tokenbefore 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.