@better-auth/expo 1.7.0-rc.5 → 1.7.0
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 +15 -12
- package/dist/client.js +1 -1
- package/dist/index.d.ts +15 -10
- package/dist/index.js +1 -1
- package/dist/plugins/index.d.ts +3 -1
- package/dist/plugins/index.js +1 -1
- package/dist/{version-CwxXc1Y6.js → version-CIRMrV-e.js} +1 -1
- package/package.json +6 -6
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { parseSetCookieHeader } from "better-auth/cookies/utils";
|
|
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";
|
|
4
6
|
import * as SecureStore from "expo-secure-store";
|
|
7
|
+
|
|
5
8
|
//#region src/focus-manager.d.ts
|
|
6
9
|
declare function setupExpoFocusManager(): FocusManager;
|
|
7
10
|
//#endregion
|
|
@@ -51,7 +54,7 @@ interface ExpoClientOptions {
|
|
|
51
54
|
* });
|
|
52
55
|
* ```
|
|
53
56
|
*/
|
|
54
|
-
webBrowserOptions?:
|
|
57
|
+
webBrowserOptions?: _$expo_web_browser0.AuthSessionOpenOptions;
|
|
55
58
|
}
|
|
56
59
|
declare function getSetCookie(header: string, prevCookie?: string | undefined): string;
|
|
57
60
|
declare function getCookie(cookie: string | null): string;
|
|
@@ -123,7 +126,7 @@ declare const expoClient: (opts: ExpoClientOptions) => {
|
|
|
123
126
|
id: string;
|
|
124
127
|
name: string;
|
|
125
128
|
hooks: {
|
|
126
|
-
onSuccess(context:
|
|
129
|
+
onSuccess(context: _$_better_fetch_fetch0.SuccessContext<any>): Promise<void>;
|
|
127
130
|
};
|
|
128
131
|
init(url: string, options: ({
|
|
129
132
|
priority?: RequestPriority | undefined;
|
|
@@ -138,17 +141,17 @@ declare const expoClient: (opts: ExpoClientOptions) => {
|
|
|
138
141
|
referrer?: string | undefined;
|
|
139
142
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
140
143
|
signal?: (AbortSignal | null) | undefined;
|
|
141
|
-
onRequest?: (<T extends Record<string, any>>(context:
|
|
142
|
-
onResponse?: ((context:
|
|
143
|
-
onSuccess?: ((context:
|
|
144
|
-
onError?: ((context:
|
|
145
|
-
onRetry?: ((response:
|
|
144
|
+
onRequest?: (<T extends Record<string, any>>(context: _$_better_fetch_fetch0.RequestContext<T>) => Promise<_$_better_fetch_fetch0.RequestContext | void> | _$_better_fetch_fetch0.RequestContext | void) | undefined;
|
|
145
|
+
onResponse?: ((context: _$_better_fetch_fetch0.ResponseContext) => Promise<Response | void | _$_better_fetch_fetch0.ResponseContext> | Response | _$_better_fetch_fetch0.ResponseContext | void) | undefined;
|
|
146
|
+
onSuccess?: ((context: _$_better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
147
|
+
onError?: ((context: _$_better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
|
|
148
|
+
onRetry?: ((response: _$_better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
|
|
146
149
|
hookOptions?: {
|
|
147
150
|
cloneResponse?: boolean;
|
|
148
151
|
} | undefined;
|
|
149
152
|
timeout?: number | undefined;
|
|
150
|
-
customFetchImpl?:
|
|
151
|
-
plugins?:
|
|
153
|
+
customFetchImpl?: _$_better_fetch_fetch0.FetchEsque | undefined;
|
|
154
|
+
plugins?: _$_better_fetch_fetch0.BetterFetchPlugin[] | undefined;
|
|
152
155
|
baseURL?: string | undefined;
|
|
153
156
|
throw?: boolean | undefined;
|
|
154
157
|
auth?: ({
|
|
@@ -174,10 +177,10 @@ declare const expoClient: (opts: ExpoClientOptions) => {
|
|
|
174
177
|
params?: any;
|
|
175
178
|
duplex?: "full" | "half" | undefined;
|
|
176
179
|
jsonParser?: ((text: string) => Promise<any> | any) | undefined;
|
|
177
|
-
retry?:
|
|
180
|
+
retry?: _$_better_fetch_fetch0.RetryOptions | undefined;
|
|
178
181
|
retryAttempt?: number | undefined;
|
|
179
|
-
output?: (
|
|
180
|
-
errorSchema?:
|
|
182
|
+
output?: (_$_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
183
|
+
errorSchema?: _$_better_fetch_fetch0.StandardSchemaV1 | undefined;
|
|
181
184
|
disableValidation?: boolean | undefined;
|
|
182
185
|
} & Record<string, any>) | undefined): Promise<{
|
|
183
186
|
url: string;
|
package/dist/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { t as PACKAGE_VERSION } from "./version-CIRMrV-e.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/utils";
|
|
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:
|
|
24
|
+
init: (ctx: _$better_auth0.AuthContext) => {
|
|
20
25
|
options: {
|
|
21
26
|
trustedOrigins: string[];
|
|
22
27
|
};
|
|
23
28
|
};
|
|
24
|
-
onRequest(request: Request, ctx:
|
|
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:
|
|
30
|
-
handler:
|
|
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:
|
|
39
|
+
expoAuthorizationProxy: _$better_call0.StrictEndpoint<"/expo-authorization-proxy", {
|
|
35
40
|
method: "GET";
|
|
36
|
-
query:
|
|
37
|
-
authorizationURL:
|
|
38
|
-
oauthState:
|
|
39
|
-
},
|
|
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") |
|
|
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-
|
|
1
|
+
import { t as PACKAGE_VERSION } from "./version-CIRMrV-e.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";
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -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:
|
|
28
|
+
onResponse: (ctx: _$_better_fetch_fetch0.ResponseContext) => Promise<void>;
|
|
27
29
|
};
|
|
28
30
|
}[];
|
|
29
31
|
getActions(): {
|
package/dist/plugins/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/expo",
|
|
3
|
-
"version": "1.7.0
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Better Auth integration for Expo and React Native applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"expo-secure-store": "~56.0.4",
|
|
71
71
|
"expo-web-browser": "~56.0.5",
|
|
72
72
|
"react-native": "~0.86.0",
|
|
73
|
-
"tsdown": "0.
|
|
74
|
-
"@better-auth/core": "1.7.0
|
|
75
|
-
"better-auth": "1.7.0
|
|
73
|
+
"tsdown": "0.21.10",
|
|
74
|
+
"@better-auth/core": "1.7.0",
|
|
75
|
+
"better-auth": "1.7.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"expo-constants": ">=17.0.0",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"expo-network": ">=8.0.7",
|
|
81
81
|
"expo-secure-store": ">=12.5.0",
|
|
82
82
|
"expo-web-browser": ">=14.0.0",
|
|
83
|
-
"@better-auth/core": "^1.7.0
|
|
84
|
-
"better-auth": "^1.7.0
|
|
83
|
+
"@better-auth/core": "^1.7.0",
|
|
84
|
+
"better-auth": "^1.7.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependenciesMeta": {
|
|
87
87
|
"expo-constants": {
|