Skip to content

createMemoryTokenStorage — @gj-kit/expo-auth

A public function from @gj-kit/expo-auth/testing. The signature below is taken directly from the 0.1.1 release declaration.

import { createMemoryTokenStorage } from '@gj-kit/expo-auth/testing';
/**
* Create an in-memory token storage (design §5.1). Reads are always read-through (a
* `simulateExternalRotation` is visible to the very next `getTokens` — the §3.1 freshness
* clause), `setTokens` without `persistence` keeps the current mode (H14), and `clearTokens`
* resets the mode to `'durable'`, the implementation default.
*/
declare function createMemoryTokenStorage(initial?: {
readonly tokens?: TokenPair | undefined;
readonly persistence?: TokenPersistence | undefined;
}): MemoryTokenStorage;

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/expo-auth
  • Version: 0.1.1
  • Public entry: ./testing
  • Source: GitHub