@better-auth/expo 1.1.18-beta.1 → 1.1.18-beta.2
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -2
- package/dist/index.mjs +5 -2
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -11,7 +11,7 @@ declare const expo: (options?: ExpoOptions) => {
|
|
|
11
11
|
id: "expo";
|
|
12
12
|
init: (ctx: better_auth.AuthContext) => {
|
|
13
13
|
options: {
|
|
14
|
-
trustedOrigins: string[]
|
|
14
|
+
trustedOrigins: string[];
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
onRequest(request: Request, ctx: better_auth.AuthContext): Promise<{
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ declare const expo: (options?: ExpoOptions) => {
|
|
|
11
11
|
id: "expo";
|
|
12
12
|
init: (ctx: better_auth.AuthContext) => {
|
|
13
13
|
options: {
|
|
14
|
-
trustedOrigins: string[]
|
|
14
|
+
trustedOrigins: string[];
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
onRequest(request: Request, ctx: better_auth.AuthContext): Promise<{
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ var expo = (options) => {
|
|
|
27
27
|
return {
|
|
28
28
|
id: "expo",
|
|
29
29
|
init: (ctx) => {
|
|
30
|
-
const trustedOrigins = process.env.NODE_ENV === "development" ? [...ctx.
|
|
30
|
+
const trustedOrigins = process.env.NODE_ENV === "development" ? [...ctx.trustedOrigins || [], "exp://"] : ctx.trustedOrigins;
|
|
31
31
|
return {
|
|
32
32
|
options: {
|
|
33
33
|
trustedOrigins
|
|
@@ -55,7 +55,10 @@ var expo = (options) => {
|
|
|
55
55
|
return context.path?.startsWith("/callback") || context.path?.startsWith("/oauth2/callback");
|
|
56
56
|
},
|
|
57
57
|
handler: async (ctx) => {
|
|
58
|
-
const headers = ctx.
|
|
58
|
+
const headers = ctx.context.returned?.headers;
|
|
59
|
+
if (!headers) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
59
62
|
const location = headers.get("location");
|
|
60
63
|
if (!location) {
|
|
61
64
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ var expo = (options) => {
|
|
|
3
3
|
return {
|
|
4
4
|
id: "expo",
|
|
5
5
|
init: (ctx) => {
|
|
6
|
-
const trustedOrigins = process.env.NODE_ENV === "development" ? [...ctx.
|
|
6
|
+
const trustedOrigins = process.env.NODE_ENV === "development" ? [...ctx.trustedOrigins || [], "exp://"] : ctx.trustedOrigins;
|
|
7
7
|
return {
|
|
8
8
|
options: {
|
|
9
9
|
trustedOrigins
|
|
@@ -31,7 +31,10 @@ var expo = (options) => {
|
|
|
31
31
|
return context.path?.startsWith("/callback") || context.path?.startsWith("/oauth2/callback");
|
|
32
32
|
},
|
|
33
33
|
handler: async (ctx) => {
|
|
34
|
-
const headers = ctx.
|
|
34
|
+
const headers = ctx.context.returned?.headers;
|
|
35
|
+
if (!headers) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
35
38
|
const location = headers.get("location");
|
|
36
39
|
if (!location) {
|
|
37
40
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/expo",
|
|
3
|
-
"version": "1.1.18-beta.
|
|
3
|
+
"version": "1.1.18-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"expo-secure-store": "~13.0.2",
|
|
39
39
|
"expo-web-browser": "~13.0.3",
|
|
40
40
|
"vitest": "^1.6.0",
|
|
41
|
-
"better-auth": "1.1.18-beta.
|
|
41
|
+
"better-auth": "1.1.18-beta.2"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"better-auth": "1.1.18-beta.
|
|
44
|
+
"better-auth": "1.1.18-beta.2"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"better-call": "^0.3.3",
|