diff --git a/api/src/index.ts b/api/src/index.ts index 66f4964..d67b4ac 100644 --- a/api/src/index.ts +++ b/api/src/index.ts @@ -10,7 +10,7 @@ const app = getHono(); app.use( "/api/*", cors({ - origin: 'https://money.koon.us', + origin: ['https://money.koon.us','http://localhost:8081'], allowMethods: ["POST", "GET", "OPTIONS"], allowHeaders: ["Content-Type", "Authorization"], credentials: true, diff --git a/app/auth.tsx b/app/auth.tsx index 23b0089..7a24f69 100644 --- a/app/auth.tsx +++ b/app/auth.tsx @@ -5,7 +5,7 @@ export default function Auth() { const onLogin = () => { authClient.signIn.oauth2({ providerId: "koon-family", - callbackURL: "http://localhost:8081" + callbackURL: process.env.NODE_ENV == 'production' ? 'https://money.koon.us' : "http://localhost:8081" }); };