Skip to content

MemoryTokenStorage — @gj-kit/expo-auth

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

import { MemoryTokenStorage } from '@gj-kit/expo-auth/testing';
/** In-memory {@link TokenStorage} with cross-tab simulators. Practical in SSR and app tests too. */
type MemoryTokenStorage = TokenStorage & {
/** Simulate another tab's rotation — the only way to reproduce the H2/H2b/H3 scenarios. */
simulateExternalRotation(tokens: TokenPair): void;
/** Simulate another tab clearing storage (sign-out elsewhere). */
simulateExternalClear(): void;
/** Observability: the current persistence mode (asserting H14 stickiness). */
readonly persistence: TokenPersistence;
/** Observability: number of underlying reads (asserting H2b/H3 re-read counts and H10 caching). */
readonly readCount: number;
};

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