AuthClientOptions
Defined in: packages/auth/src/client/AuthClient.ts:81
Configuration for AuthClient.
Properties
Section titled “Properties”environment
Section titled “environment”environment:
AuthEnvironment
Defined in: packages/auth/src/client/AuthClient.ts:88
Runtime environment. The SDK resolves the underlying Account/Auth service URL from this — consumers do not need to know infra-level URLs. Use AuthEnvironment.Production for live traffic, AuthEnvironment.Development for the dev/staging tier.
fallbackExpiresInSeconds?
Section titled “fallbackExpiresInSeconds?”
optionalfallbackExpiresInSeconds?:number
Defined in: packages/auth/src/client/AuthClient.ts:106
Fallback expiry seconds when the backend omits expires_in.
Default 86_400 (24 hours).
getLanguage?
Section titled “getLanguage?”
optionalgetLanguage?: () =>Awaitable<string|null|undefined>
Defined in: packages/auth/src/client/AuthClient.ts:94
Resolver for the user’s preferred language.
Returns
Section titled “Returns”Awaitable<string | null | undefined>
getSigningSecret?
Section titled “getSigningSecret?”
optionalgetSigningSecret?: () =>string|undefined
Defined in: packages/auth/src/client/AuthClient.ts:92
HMAC signing secret resolver, forwarded to the underlying RestClient.
Returns
Section titled “Returns”string | undefined
logger?
Section titled “logger?”
optionallogger?:Logger
Defined in: packages/auth/src/client/AuthClient.ts:108
Optional logger for non-throwing diagnostics.
onTokensChanged?
Section titled “onTokensChanged?”
optionalonTokensChanged?: (tokens) =>void
Defined in: packages/auth/src/client/AuthClient.ts:114
Invoked after tokens are persisted (login / refresh) or cleared (logout). Consumers wire this into their own state store (Zustand / Redux) or cross-tab broadcast.
Parameters
Section titled “Parameters”tokens
Section titled “tokens”AuthTokens | null
Returns
Section titled “Returns”void
storage?
Section titled “storage?”
optionalstorage?:TokenStorageAdapter
Defined in: packages/auth/src/client/AuthClient.ts:101
Token storage adapter. Defaults to a fresh MemoryTokenStorageAdapter — suitable for tests and SSR. Web consumers should pass a cookie/localStorage-backed adapter, RN consumers an AsyncStorage/SecureStore-backed adapter.
timeout?
Section titled “timeout?”
optionaltimeout?:number
Defined in: packages/auth/src/client/AuthClient.ts:90
Per-request timeout in milliseconds. Default 10_000.