@better-auth/expo 0.8.0 → 0.8.1-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.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @better-auth/expo@0.7.6-beta.4 build /Users/apple/Desktop/development/better-auth-2/packages/expo
3
+ > @better-auth/expo@0.8.1-beta.1 build /Users/apple/Desktop/development/better-auth-2/packages/expo
4
4
  > tsup --dts --minify --clean
5
5
 
6
6
  CLI Building entry: {"index":"src/index.ts","client":"src/client.ts"}
@@ -11,15 +11,15 @@
11
11
  CLI Cleaning output folder
12
12
  ESM Build start
13
13
  CJS Build start
14
- ESM dist/index.mjs 774.00 B
15
- ESM dist/client.mjs 2.47 KB
16
- ESM ⚡️ Build success in 11ms
17
- CJS dist/client.js 3.10 KB
18
- CJS dist/index.js 1.24 KB
19
- CJS ⚡️ Build success in 11ms
14
+ ESM dist/index.mjs 744.00 B
15
+ ESM dist/client.mjs 2.32 KB
16
+ ESM ⚡️ Build success in 24ms
17
+ CJS dist/index.js 1.20 KB
18
+ CJS dist/client.js 2.95 KB
19
+ CJS ⚡️ Build success in 25ms
20
20
  DTS Build start
21
- DTS ⚡️ Build success in 3118ms
21
+ DTS ⚡️ Build success in 3716ms
22
22
  DTS dist/index.d.mts 688.00 B
23
- DTS dist/client.d.mts 4.27 KB
23
+ DTS dist/client.d.mts 3.96 KB
24
24
  DTS dist/index.d.ts 688.00 B
25
- DTS dist/client.d.ts 4.27 KB
25
+ DTS dist/client.d.ts 3.96 KB
package/dist/client.d.mts CHANGED
@@ -14,18 +14,7 @@ interface ExpoClientOptions {
14
14
  }
15
15
  declare const expoClient: (opts?: ExpoClientOptions) => {
16
16
  id: "expo";
17
- getActions($fetch: _better_fetch_fetch.BetterFetch, $store: Store): {
18
- signInWithIdToken?: undefined;
19
- } | {
20
- signInWithIdToken: (idToken: string) => Promise<{
21
- data: unknown;
22
- error: {
23
- message?: string | undefined;
24
- status: number;
25
- statusText: string;
26
- } | null;
27
- }>;
28
- };
17
+ getActions(_: _better_fetch_fetch.BetterFetch, $store: Store): {};
29
18
  fetchPlugins: {
30
19
  id: string;
31
20
  name: string;
package/dist/client.d.ts CHANGED
@@ -14,18 +14,7 @@ interface ExpoClientOptions {
14
14
  }
15
15
  declare const expoClient: (opts?: ExpoClientOptions) => {
16
16
  id: "expo";
17
- getActions($fetch: _better_fetch_fetch.BetterFetch, $store: Store): {
18
- signInWithIdToken?: undefined;
19
- } | {
20
- signInWithIdToken: (idToken: string) => Promise<{
21
- data: unknown;
22
- error: {
23
- message?: string | undefined;
24
- status: number;
25
- statusText: string;
26
- } | null;
27
- }>;
28
- };
17
+ getActions(_: _better_fetch_fetch.BetterFetch, $store: Store): {};
29
18
  fetchPlugins: {
30
19
  id: string;
31
20
  name: string;
package/dist/client.js CHANGED
@@ -1 +1 @@
1
- "use strict";var O=Object.create;var d=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var A=(e,t)=>{for(var r in t)d(e,r,{get:t[r],enumerable:!0})},b=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of L(t))!I.call(e,n)&&n!==r&&d(e,n,{get:()=>t[n],enumerable:!(i=x(t,n))||i.enumerable});return e};var f=(e,t,r)=>(r=e!=null?O(R(e)):{},b(t||!e||!e.__esModule?d(r,"default",{value:e,enumerable:!0}):r,e)),U=e=>b(d({},"__esModule",{value:!0}),e);var D={};A(D,{expoClient:()=>E});module.exports=U(D);var C=f(require("expo-web-browser")),h=f(require("expo-linking")),p=require("react-native"),P=f(require("expo-secure-store")),y=f(require("expo-constants"));function N(e){let t=new Map;return e.split(", ").forEach(i=>{let[n,...a]=i.split("; "),[l,o]=n.split("="),s={value:o};a.forEach(c=>{let[u,g]=c.split("=");s[u.toLowerCase()]=g}),t.set(l,s)}),t}function S(e){let t=N(e),r={};return t.forEach((i,n)=>{let a=i.expires,l=i["max-age"],o=a?new Date(String(a)):l?new Date(Date.now()+Number(l)):null;r[n]={value:i.value,expires:o}}),JSON.stringify(r)}function v(e){let t={};try{t=JSON.parse(e)}catch{}return Object.entries(t).reduce((i,[n,a])=>a.expires&&a.expires<new Date?i:`${i}; ${n}=${a.value}`,"")}function B(e){return h.createURL("",{scheme:e})}var E=e=>{let t=null,r=`${e?.storagePrefix||"better-auth"}_cookie`,i=`${e?.storagePrefix||"better-auth"}_session_data`,n=e?.storage||P,a=e?.scheme||y.default.platform?.scheme,l=p.Platform.OS==="web";if(!a&&!l)throw new Error("Scheme not found in app.json. Please provide a scheme in the options.");return{id:"expo",getActions(o,s){if(p.Platform.OS==="web")return{};t=s;let c=n.getItem(r);return c&&s.atoms.session.set({data:JSON.parse(c),error:null,isPending:!1}),{signInWithIdToken:async u=>{let{data:g,error:m}=await o("/sign-in/id-token",{method:"POST",body:JSON.stringify({idToken:u})});return{data:g,error:m}}}},fetchPlugins:[{id:"expo",name:"Expo",hooks:{async onSuccess(o){if(l)return;let s=o.response.headers.get("set-cookie");if(s){let c=S(s||"");await n.setItem(r,c),t?.notify("$sessionSignal")}if(o.request.url.toString().includes("/get-session")&&!e?.disableCache){let c=o.data;n.setItem(i,JSON.stringify(c))}if(o.data.redirect&&o.request.url.toString().includes("/sign-in")){let u=JSON.parse(o.request.body)?.callbackURL,g=o.data?.url,m=await C.openAuthSessionAsync(g,u);if(m.type!=="success")return;let w=new URL(m.url),k=String(w.searchParams.get("cookie"));if(!k)return;n.setItem(r,S(k)),t?.notify("$sessionSignal")}}},async init(o,s){if(l)return{url:o,options:{...s,signal:new AbortController().signal}};s=s||{};let c=n.getItem(r),u=v(c||"{}");if(s.credentials="omit",s.headers={...s.headers,cookie:u,"expo-origin":B(a)},s.body?.callbackURL&&s.body.callbackURL.startsWith("/")){let g=h.createURL(s.body.callbackURL,{scheme:a});s.body.callbackURL=g}return o.includes("/sign-out")&&(await n.setItem(r,"{}"),t?.atoms.session?.set({data:null,error:null,isPending:!1}),n.setItem(i,"{}")),{url:o,options:{...s,signal:new AbortController().signal}}}}]}};0&&(module.exports={expoClient});
1
+ "use strict";var x=Object.create;var m=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var U=(e,t)=>{for(var r in t)m(e,r,{get:t[r],enumerable:!0})},b=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of O(t))!A.call(e,o)&&o!==r&&m(e,o,{get:()=>t[o],enumerable:!(i=L(t,o))||i.enumerable});return e};var f=(e,t,r)=>(r=e!=null?x(R(e)):{},b(t||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),I=e=>b(m({},"__esModule",{value:!0}),e);var D={};U(D,{expoClient:()=>E});module.exports=I(D);var C=f(require("expo-web-browser")),p=f(require("expo-linking")),d=require("react-native"),P=f(require("expo-secure-store")),y=f(require("expo-constants"));function N(e){let t=new Map;return e.split(", ").forEach(i=>{let[o,...a]=i.split("; "),[l,n]=o.split("="),s={value:n};a.forEach(c=>{let[u,g]=c.split("=");s[u.toLowerCase()]=g}),t.set(l,s)}),t}function S(e){let t=N(e),r={};return t.forEach((i,o)=>{let a=i.expires,l=i["max-age"],n=a?new Date(String(a)):l?new Date(Date.now()+Number(l)):null;r[o]={value:i.value,expires:n}}),JSON.stringify(r)}function v(e){let t={};try{t=JSON.parse(e)}catch{}return Object.entries(t).reduce((i,[o,a])=>a.expires&&a.expires<new Date?i:`${i}; ${o}=${a.value}`,"")}function B(e){return p.createURL("",{scheme:e})}var E=e=>{let t=null,r=`${e?.storagePrefix||"better-auth"}_cookie`,i=`${e?.storagePrefix||"better-auth"}_session_data`,o=e?.storage||P,a=e?.scheme||y.default.platform?.scheme,l=d.Platform.OS==="web";if(!a&&!l)throw new Error("Scheme not found in app.json. Please provide a scheme in the options.");return{id:"expo",getActions(n,s){if(d.Platform.OS==="web")return{};t=s;let c=o.getItem(r);return c&&s.atoms.session.set({data:JSON.parse(c),error:null,isPending:!1}),{}},fetchPlugins:[{id:"expo",name:"Expo",hooks:{async onSuccess(n){if(l)return;let s=n.response.headers.get("set-cookie");if(s){let c=S(s||"");await o.setItem(r,c),t?.notify("$sessionSignal")}if(n.request.url.toString().includes("/get-session")&&!e?.disableCache){let c=n.data;o.setItem(i,JSON.stringify(c))}if(n.data.redirect&&n.request.url.toString().includes("/sign-in")){let u=JSON.parse(n.request.body)?.callbackURL,g=n.data?.url,h=await C.openAuthSessionAsync(g,u);if(h.type!=="success")return;let w=new URL(h.url),k=String(w.searchParams.get("cookie"));if(!k)return;o.setItem(r,S(k)),t?.notify("$sessionSignal")}}},async init(n,s){if(l)return{url:n,options:{...s,signal:new AbortController().signal}};s=s||{};let c=o.getItem(r),u=v(c||"{}");if(s.credentials="omit",s.headers={...s.headers,cookie:u,"expo-origin":B(a)},s.body?.callbackURL&&s.body.callbackURL.startsWith("/")){let g=p.createURL(s.body.callbackURL,{scheme:a});s.body.callbackURL=g}return n.includes("/sign-out")&&(await o.setItem(r,"{}"),t?.atoms.session?.set({data:null,error:null,isPending:!1}),o.setItem(i,"{}")),{url:n,options:{...s,signal:new AbortController().signal}}}}]}};0&&(module.exports={expoClient});
package/dist/client.mjs CHANGED
@@ -1 +1 @@
1
- import*as k from"expo-web-browser";import*as d from"expo-linking";import{Platform as p}from"react-native";import*as S from"expo-secure-store";import C from"expo-constants";function y(s){let r=new Map;return s.split(", ").forEach(o=>{let[n,...i]=o.split("; "),[l,t]=n.split("="),e={value:t};i.forEach(a=>{let[u,g]=a.split("=");e[u.toLowerCase()]=g}),r.set(l,e)}),r}function h(s){let r=y(s),c={};return r.forEach((o,n)=>{let i=o.expires,l=o["max-age"],t=i?new Date(String(i)):l?new Date(Date.now()+Number(l)):null;c[n]={value:o.value,expires:t}}),JSON.stringify(c)}function w(s){let r={};try{r=JSON.parse(s)}catch{}return Object.entries(r).reduce((o,[n,i])=>i.expires&&i.expires<new Date?o:`${o}; ${n}=${i.value}`,"")}function O(s){return d.createURL("",{scheme:s})}var R=s=>{let r=null,c=`${s?.storagePrefix||"better-auth"}_cookie`,o=`${s?.storagePrefix||"better-auth"}_session_data`,n=s?.storage||S,i=s?.scheme||C.platform?.scheme,l=p.OS==="web";if(!i&&!l)throw new Error("Scheme not found in app.json. Please provide a scheme in the options.");return{id:"expo",getActions(t,e){if(p.OS==="web")return{};r=e;let a=n.getItem(c);return a&&e.atoms.session.set({data:JSON.parse(a),error:null,isPending:!1}),{signInWithIdToken:async u=>{let{data:g,error:m}=await t("/sign-in/id-token",{method:"POST",body:JSON.stringify({idToken:u})});return{data:g,error:m}}}},fetchPlugins:[{id:"expo",name:"Expo",hooks:{async onSuccess(t){if(l)return;let e=t.response.headers.get("set-cookie");if(e){let a=h(e||"");await n.setItem(c,a),r?.notify("$sessionSignal")}if(t.request.url.toString().includes("/get-session")&&!s?.disableCache){let a=t.data;n.setItem(o,JSON.stringify(a))}if(t.data.redirect&&t.request.url.toString().includes("/sign-in")){let u=JSON.parse(t.request.body)?.callbackURL,g=t.data?.url,m=await k.openAuthSessionAsync(g,u);if(m.type!=="success")return;let b=new URL(m.url),f=String(b.searchParams.get("cookie"));if(!f)return;n.setItem(c,h(f)),r?.notify("$sessionSignal")}}},async init(t,e){if(l)return{url:t,options:{...e,signal:new AbortController().signal}};e=e||{};let a=n.getItem(c),u=w(a||"{}");if(e.credentials="omit",e.headers={...e.headers,cookie:u,"expo-origin":O(i)},e.body?.callbackURL&&e.body.callbackURL.startsWith("/")){let g=d.createURL(e.body.callbackURL,{scheme:i});e.body.callbackURL=g}return t.includes("/sign-out")&&(await n.setItem(c,"{}"),r?.atoms.session?.set({data:null,error:null,isPending:!1}),n.setItem(o,"{}")),{url:t,options:{...e,signal:new AbortController().signal}}}}]}};export{R as expoClient};
1
+ import*as k from"expo-web-browser";import*as m from"expo-linking";import{Platform as p}from"react-native";import*as S from"expo-secure-store";import C from"expo-constants";function y(s){let r=new Map;return s.split(", ").forEach(n=>{let[o,...i]=n.split("; "),[l,t]=o.split("="),e={value:t};i.forEach(a=>{let[u,g]=a.split("=");e[u.toLowerCase()]=g}),r.set(l,e)}),r}function h(s){let r=y(s),c={};return r.forEach((n,o)=>{let i=n.expires,l=n["max-age"],t=i?new Date(String(i)):l?new Date(Date.now()+Number(l)):null;c[o]={value:n.value,expires:t}}),JSON.stringify(c)}function w(s){let r={};try{r=JSON.parse(s)}catch{}return Object.entries(r).reduce((n,[o,i])=>i.expires&&i.expires<new Date?n:`${n}; ${o}=${i.value}`,"")}function x(s){return m.createURL("",{scheme:s})}var R=s=>{let r=null,c=`${s?.storagePrefix||"better-auth"}_cookie`,n=`${s?.storagePrefix||"better-auth"}_session_data`,o=s?.storage||S,i=s?.scheme||C.platform?.scheme,l=p.OS==="web";if(!i&&!l)throw new Error("Scheme not found in app.json. Please provide a scheme in the options.");return{id:"expo",getActions(t,e){if(p.OS==="web")return{};r=e;let a=o.getItem(c);return a&&e.atoms.session.set({data:JSON.parse(a),error:null,isPending:!1}),{}},fetchPlugins:[{id:"expo",name:"Expo",hooks:{async onSuccess(t){if(l)return;let e=t.response.headers.get("set-cookie");if(e){let a=h(e||"");await o.setItem(c,a),r?.notify("$sessionSignal")}if(t.request.url.toString().includes("/get-session")&&!s?.disableCache){let a=t.data;o.setItem(n,JSON.stringify(a))}if(t.data.redirect&&t.request.url.toString().includes("/sign-in")){let u=JSON.parse(t.request.body)?.callbackURL,g=t.data?.url,f=await k.openAuthSessionAsync(g,u);if(f.type!=="success")return;let b=new URL(f.url),d=String(b.searchParams.get("cookie"));if(!d)return;o.setItem(c,h(d)),r?.notify("$sessionSignal")}}},async init(t,e){if(l)return{url:t,options:{...e,signal:new AbortController().signal}};e=e||{};let a=o.getItem(c),u=w(a||"{}");if(e.credentials="omit",e.headers={...e.headers,cookie:u,"expo-origin":x(i)},e.body?.callbackURL&&e.body.callbackURL.startsWith("/")){let g=m.createURL(e.body.callbackURL,{scheme:i});e.body.callbackURL=g}return t.includes("/sign-out")&&(await o.setItem(c,"{}"),r?.atoms.session?.set({data:null,error:null,isPending:!1}),o.setItem(n,"{}")),{url:t,options:{...e,signal:new AbortController().signal}}}}]}};export{R as expoClient};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var h=(t,e)=>{for(var r in e)o(t,r,{get:e[r],enumerable:!0})},g=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of p(e))!d.call(t,s)&&s!==r&&o(t,s,{get:()=>e[s],enumerable:!(i=c(e,s))||i.enumerable});return t};var f=t=>g(o({},"__esModule",{value:!0}),t);var l={};h(l,{expo:()=>m});module.exports=f(l);var x=require("@better-fetch/fetch"),b=require("better-auth/api"),A=require("zod"),m=()=>({id:"expo",init:t=>({options:{trustedOrigins:process.env.NODE_ENV==="development"?[...t.options.trustedOrigins||[],"exp://"]:t.options.trustedOrigins}}),async onRequest(t,e){let r=t.headers.get("expo-origin");if(r)return t.headers.set("origin",r),{request:t}},hooks:{after:[{matcher(t){return t.path?.startsWith("/callback")},handler:async t=>{let e=t.context.returned;if(e.status===302){let r=e.headers.get("location");if(!r||!t.context.trustedOrigins.filter(n=>!n.startsWith("http")).some(n=>r?.startsWith(n)))return;let a=e.headers.get("set-cookie");if(!a)return;let u=new URL(r);return u.searchParams.set("cookie",a),e.headers.set("location",u.toString()),{response:e}}}}]}});0&&(module.exports={expo});
1
+ "use strict";var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var h=(t,e)=>{for(var r in e)o(t,r,{get:e[r],enumerable:!0})},p=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of g(e))!d.call(t,s)&&s!==r&&o(t,s,{get:()=>e[s],enumerable:!(i=c(e,s))||i.enumerable});return t};var l=t=>p(o({},"__esModule",{value:!0}),t);var f={};h(f,{expo:()=>O});module.exports=l(f);var O=()=>({id:"expo",init:t=>({options:{trustedOrigins:process.env.NODE_ENV==="development"?[...t.options.trustedOrigins||[],"exp://"]:t.options.trustedOrigins}}),async onRequest(t,e){if(t.headers.get("origin"))return;let r=t.headers.get("expo-origin");if(r)return t.headers.set("origin",r),{request:t}},hooks:{after:[{matcher(t){return t.path?.startsWith("/callback")},handler:async t=>{let e=t.context.returned;if(e.status===302){let r=e.headers.get("location");if(!r||!t.context.trustedOrigins.filter(n=>!n.startsWith("http")).some(n=>r?.startsWith(n)))return;let a=e.headers.get("set-cookie");if(!a)return;let u=new URL(r);return u.searchParams.set("cookie",a),e.headers.set("location",u.toString()),{response:e}}}}]}});0&&(module.exports={expo});
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import"@better-fetch/fetch";import"better-auth/api";import"zod";var f=()=>({id:"expo",init:t=>({options:{trustedOrigins:process.env.NODE_ENV==="development"?[...t.options.trustedOrigins||[],"exp://"]:t.options.trustedOrigins}}),async onRequest(t,e){let r=t.headers.get("expo-origin");if(r)return t.headers.set("origin",r),{request:t}},hooks:{after:[{matcher(t){return t.path?.startsWith("/callback")},handler:async t=>{let e=t.context.returned;if(e.status===302){let r=e.headers.get("location");if(!r||!t.context.trustedOrigins.filter(s=>!s.startsWith("http")).some(s=>r?.startsWith(s)))return;let i=e.headers.get("set-cookie");if(!i)return;let n=new URL(r);return n.searchParams.set("cookie",i),e.headers.set("location",n.toString()),{response:e}}}}]}});export{f as expo};
1
+ var u=()=>({id:"expo",init:t=>({options:{trustedOrigins:process.env.NODE_ENV==="development"?[...t.options.trustedOrigins||[],"exp://"]:t.options.trustedOrigins}}),async onRequest(t,e){if(t.headers.get("origin"))return;let r=t.headers.get("expo-origin");if(r)return t.headers.set("origin",r),{request:t}},hooks:{after:[{matcher(t){return t.path?.startsWith("/callback")},handler:async t=>{let e=t.context.returned;if(e.status===302){let r=e.headers.get("location");if(!r||!t.context.trustedOrigins.filter(s=>!s.startsWith("http")).some(s=>r?.startsWith(s)))return;let i=e.headers.get("set-cookie");if(!i)return;let n=new URL(r);return n.searchParams.set("cookie",i),e.headers.set("location",n.toString()),{response:e}}}}]}});export{u as expo};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/expo",
3
- "version": "0.8.0",
3
+ "version": "0.8.1-beta.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -28,10 +28,10 @@
28
28
  "expo-secure-store": "~13.0.2",
29
29
  "expo-web-browser": "~13.0.3",
30
30
  "vitest": "^1.6.0",
31
- "better-auth": "0.8.0"
31
+ "better-auth": "0.8.1-beta.2"
32
32
  },
33
33
  "peerDependencies": {
34
- "better-auth": "0.8.0"
34
+ "better-auth": "0.8.1-beta.2"
35
35
  },
36
36
  "dependencies": {
37
37
  "zod": "^3.23.8"
package/src/client.ts CHANGED
@@ -104,7 +104,7 @@ export const expoClient = (opts?: ExpoClientOptions) => {
104
104
  }
105
105
  return {
106
106
  id: "expo",
107
- getActions($fetch, $store) {
107
+ getActions(_, $store) {
108
108
  if (Platform.OS === "web") return {};
109
109
  store = $store;
110
110
  const localSession = storage.getItem(cookieName);
@@ -114,15 +114,7 @@ export const expoClient = (opts?: ExpoClientOptions) => {
114
114
  error: null,
115
115
  isPending: false,
116
116
  });
117
- return {
118
- signInWithIdToken: async (idToken: string) => {
119
- const { data, error } = await $fetch("/sign-in/id-token", {
120
- method: "POST",
121
- body: JSON.stringify({ idToken }),
122
- });
123
- return { data, error };
124
- },
125
- };
117
+ return {};
126
118
  },
127
119
  fetchPlugins: [
128
120
  {
package/src/index.ts CHANGED
@@ -1,7 +1,4 @@
1
- import { betterFetch } from "@better-fetch/fetch";
2
1
  import type { BetterAuthPlugin } from "better-auth";
3
- import { createAuthEndpoint } from "better-auth/api";
4
- import { z } from "zod";
5
2
 
6
3
  export const expo = () => {
7
4
  return {
@@ -18,6 +15,9 @@ export const expo = () => {
18
15
  };
19
16
  },
20
17
  async onRequest(request, ctx) {
18
+ if (request.headers.get("origin")) {
19
+ return;
20
+ }
21
21
  /**
22
22
  * To bypass origin check from expo, we need to set the origin header to the expo-origin header
23
23
  */