TokenStore

The two-method interface (get and set) between code that uses tokens and code that stores them. The app passes a SecureTokenStore backed by expo-secure-store; tests pass an in-memory object. Signed-in state is derived from it through a subscription.

Minimal example

ts
export interface TokenStore {
  get(): Promise<Tokens | null>;
  set(t: Tokens | null): Promise<void>;
}

Learn this concept

Lesson 4.5 · Secure token storage

Used in exercises

Exercise 4.7 · API client and auth screens
Prerequisite conceptsexpo-secure-store
RelatedAPI client