@better-auth/expo 1.6.27 → 1.6.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import { parseSetCookieHeader } from "better-auth/cookies";
2
2
  import { FocusManager, OnlineManager } from "better-auth/client";
3
+ import * as _$expo_web_browser0 from "expo-web-browser";
4
+ import * as _$_better_fetch_fetch0 from "@better-fetch/fetch";
3
5
  import { ClientFetchOption, ClientStore } from "@better-auth/core";
6
+
4
7
  //#region src/focus-manager.d.ts
5
8
  declare function setupExpoFocusManager(): FocusManager;
6
9
  //#endregion
@@ -49,7 +52,7 @@ interface ExpoClientOptions {
49
52
  * });
50
53
  * ```
51
54
  */
52
- webBrowserOptions?: import("expo-web-browser").AuthSessionOpenOptions;
55
+ webBrowserOptions?: _$expo_web_browser0.AuthSessionOpenOptions;
53
56
  }
54
57
  declare function getSetCookie(header: string, prevCookie?: string | undefined): string;
55
58
  declare function getCookie(cookie: string): string;
@@ -102,7 +105,7 @@ declare function storageAdapter(storage: {
102
105
  declare const expoClient: (opts: ExpoClientOptions) => {
103
106
  id: "expo";
104
107
  version: string;
105
- getActions(_: import("@better-fetch/fetch").BetterFetch, $store: ClientStore): {
108
+ getActions(_: _$_better_fetch_fetch0.BetterFetch, $store: ClientStore): {
106
109
  /**
107
110
  * Get the stored cookie.
108
111
  *
@@ -124,7 +127,7 @@ declare const expoClient: (opts: ExpoClientOptions) => {
124
127
  id: string;
125
128
  name: string;
126
129
  hooks: {
127
- onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): Promise<void>;
130
+ onSuccess(context: _$_better_fetch_fetch0.SuccessContext<any>): Promise<void>;
128
131
  };
129
132
  init(url: string, options: ({
130
133
  priority?: RequestPriority | undefined;
@@ -139,17 +142,17 @@ declare const expoClient: (opts: ExpoClientOptions) => {
139
142
  referrer?: string | undefined;
140
143
  referrerPolicy?: ReferrerPolicy | undefined;
141
144
  signal?: (AbortSignal | null) | undefined;
142
- onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
143
- onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
144
- onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
145
- onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
146
- onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
145
+ onRequest?: (<T extends Record<string, any>>(context: _$_better_fetch_fetch0.RequestContext<T>) => Promise<_$_better_fetch_fetch0.RequestContext | void> | _$_better_fetch_fetch0.RequestContext | void) | undefined;
146
+ onResponse?: ((context: _$_better_fetch_fetch0.ResponseContext) => Promise<Response | void | _$_better_fetch_fetch0.ResponseContext> | Response | _$_better_fetch_fetch0.ResponseContext | void) | undefined;
147
+ onSuccess?: ((context: _$_better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
148
+ onError?: ((context: _$_better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
149
+ onRetry?: ((response: _$_better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
147
150
  hookOptions?: {
148
151
  cloneResponse?: boolean;
149
152
  } | undefined;
150
153
  timeout?: number | undefined;
151
- customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
152
- plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
154
+ customFetchImpl?: _$_better_fetch_fetch0.FetchEsque | undefined;
155
+ plugins?: _$_better_fetch_fetch0.BetterFetchPlugin[] | undefined;
153
156
  baseURL?: string | undefined;
154
157
  throw?: boolean | undefined;
155
158
  auth?: ({
@@ -175,10 +178,10 @@ declare const expoClient: (opts: ExpoClientOptions) => {
175
178
  params?: any;
176
179
  duplex?: "full" | "half" | undefined;
177
180
  jsonParser?: ((text: string) => Promise<any> | any) | undefined;
178
- retry?: import("@better-fetch/fetch").RetryOptions | undefined;
181
+ retry?: _$_better_fetch_fetch0.RetryOptions | undefined;
179
182
  retryAttempt?: number | undefined;
180
- output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
181
- errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
183
+ output?: (_$_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
184
+ errorSchema?: _$_better_fetch_fetch0.StandardSchemaV1 | undefined;
182
185
  disableValidation?: boolean | undefined;
183
186
  } & Record<string, any>) | undefined): Promise<{
184
187
  url: string;
package/dist/client.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-B4oCeoTU.js";
1
+ import { t as PACKAGE_VERSION } from "./version-hsghBPCX.js";
2
2
  import { safeJSONParse } from "@better-auth/core/utils/json";
3
3
  import { SECURE_COOKIE_PREFIX, parseSetCookieHeader, parseSetCookieHeader as parseSetCookieHeader$1, stripSecureCookiePrefix } from "better-auth/cookies";
4
4
  import Constants from "expo-constants";
package/dist/index.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ import * as _$better_auth0 from "better-auth";
2
+ import * as _$zod from "zod";
3
+ import * as _$better_call0 from "better-call";
4
+ import * as _$zod_v4_core0 from "zod/v4/core";
5
+
1
6
  //#region src/index.d.ts
2
7
  interface ExpoOptions {
3
8
  /**
@@ -16,32 +21,32 @@ declare module "@better-auth/core" {
16
21
  declare const expo: (options?: ExpoOptions | undefined) => {
17
22
  id: "expo";
18
23
  version: string;
19
- init: (ctx: import("better-auth").AuthContext) => {
24
+ init: (ctx: _$better_auth0.AuthContext) => {
20
25
  options: {
21
26
  trustedOrigins: string[];
22
27
  };
23
28
  };
24
- onRequest(request: Request, ctx: import("better-auth").AuthContext): Promise<{
29
+ onRequest(request: Request, ctx: _$better_auth0.AuthContext): Promise<{
25
30
  request: Request;
26
31
  } | undefined>;
27
32
  hooks: {
28
33
  after: {
29
- matcher(context: import("better-auth").HookEndpointContext): boolean;
30
- handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
34
+ matcher(context: _$better_auth0.HookEndpointContext): boolean;
35
+ handler: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>;
31
36
  }[];
32
37
  };
33
38
  endpoints: {
34
- expoAuthorizationProxy: import("better-call").StrictEndpoint<"/expo-authorization-proxy", {
39
+ expoAuthorizationProxy: _$better_call0.StrictEndpoint<"/expo-authorization-proxy", {
35
40
  method: "GET";
36
- query: import("zod").ZodObject<{
37
- authorizationURL: import("zod").ZodString;
38
- oauthState: import("zod").ZodOptional<import("zod").ZodString>;
39
- }, import("zod/v4/core").$strip>;
41
+ query: _$zod.ZodObject<{
42
+ authorizationURL: _$zod.ZodString;
43
+ oauthState: _$zod.ZodOptional<_$zod.ZodString>;
44
+ }, _$zod_v4_core0.$strip>;
40
45
  metadata: {
41
46
  readonly scope: "server";
42
47
  };
43
48
  }, {
44
- status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | import("better-call").Status;
49
+ status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | _$better_call0.Status;
45
50
  body: ({
46
51
  message?: string;
47
52
  code?: string;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-B4oCeoTU.js";
1
+ import { t as PACKAGE_VERSION } from "./version-hsghBPCX.js";
2
2
  import { createAuthMiddleware } from "@better-auth/core/api";
3
3
  import { HIDE_METADATA } from "better-auth";
4
4
  import { APIError, createAuthEndpoint } from "better-auth/api";
@@ -1,4 +1,6 @@
1
+ import * as _$_better_fetch_fetch0 from "@better-fetch/fetch";
1
2
  import { Awaitable } from "@better-auth/core";
3
+
2
4
  //#region src/plugins/last-login-method.d.ts
3
5
  interface LastLoginMethodClientConfig {
4
6
  storage: {
@@ -23,7 +25,7 @@ declare const lastLoginMethodClient: (config: LastLoginMethodClientConfig) => {
23
25
  id: string;
24
26
  name: string;
25
27
  hooks: {
26
- onResponse: (ctx: import("@better-fetch/fetch").ResponseContext) => Promise<void>;
28
+ onResponse: (ctx: _$_better_fetch_fetch0.ResponseContext) => Promise<void>;
27
29
  };
28
30
  }[];
29
31
  getActions(): {
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "../version-B4oCeoTU.js";
1
+ import { t as PACKAGE_VERSION } from "../version-hsghBPCX.js";
2
2
  //#region src/plugins/last-login-method.ts
3
3
  const paths = [
4
4
  "/callback/",
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const PACKAGE_VERSION = "1.6.27";
3
+ const PACKAGE_VERSION = "1.6.28";
4
4
  //#endregion
5
5
  export { PACKAGE_VERSION as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/expo",
3
- "version": "1.6.27",
3
+ "version": "1.6.28",
4
4
  "description": "Better Auth integration for Expo and React Native applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -69,17 +69,17 @@
69
69
  "expo-network": "~55.0.8",
70
70
  "expo-web-browser": "~55.0.9",
71
71
  "react-native": "~0.84.1",
72
- "tsdown": "0.22.7",
73
- "@better-auth/core": "1.6.27",
74
- "better-auth": "1.6.27"
72
+ "tsdown": "0.21.10",
73
+ "@better-auth/core": "1.6.28",
74
+ "better-auth": "1.6.28"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "expo-constants": ">=17.0.0",
78
78
  "expo-linking": ">=7.0.0",
79
79
  "expo-network": ">=8.0.7",
80
80
  "expo-web-browser": ">=14.0.0",
81
- "@better-auth/core": "^1.6.27",
82
- "better-auth": "^1.6.27"
81
+ "@better-auth/core": "^1.6.28",
82
+ "better-auth": "^1.6.28"
83
83
  },
84
84
  "peerDependenciesMeta": {
85
85
  "expo-constants": {