콘텐츠로 이동

AuthSessionOptions — @gj-kit/expo-auth

@gj-kit/expo-auth에서 공개하는 type입니다. package version 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;
};

이 선언은 매개변수, optionality, 제네릭, 반환값, 공개 union/type 계약의 정본입니다. 호출 전 필요한 환경·권한·오류 경계는 패키지 Golden path와 이 subpath의 import 조건을 함께 확인하세요.

  • 패키지: @gj-kit/expo-auth
  • 버전: 0.1.1
  • 공개 entry: .
  • 소스: GitHub