Skip to content

AuthSessionOptions — @gj-kit/expo-auth

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

import { AuthSessionOptions } from '@gj-kit/expo-auth';
type AuthSessionOptions = {
readonly storage: TokenStorage;
readonly refresh: RefreshRequest;
/** Cross-tab serialization (H5). When omitted, only the in-instance single flight applies (sufficient on native). */
readonly lock?: RefreshLock | undefined;
/** Defaults to the system clock. Tests inject `createManualClock` from `"./testing"` (§5.1). */
readonly clock?: AuthClock | undefined;
/**
* Access token → remaining lifetime in seconds, or null when unknown. Defaults to the
* strategy based on {@link decodeJwtExpiryEpochSeconds}. Hosts with opaque (non-JWT) tokens
* supply their own strategy here.
*/
readonly accessTokenTtlSeconds?: ((accessToken: string) => number | null) | undefined;
readonly schedule?: RefreshScheduleOptions | undefined;
/**
* Notification of outcomes for refreshes the scheduler performed in the background. Not
* called for caller-initiated `refresh()` (that caller already knows via the return value).
* On `'invalid'` it is the host's call whether to navigate to sign-in — the library hands an
* outcome here too, it does not "fire a logout event". `'transient'` carries `cause` (the
* callback-throw diagnostic, §3.4) — the telemetry's only window into classifier bugs.
*/
readonly onScheduledOutcome?: ((outcome: RefreshOutcome) => void) | undefined;
};

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: .
  • Source: GitHub