feat: add prod url
This commit is contained in:
@@ -10,7 +10,7 @@ const app = getHono();
|
|||||||
app.use(
|
app.use(
|
||||||
"/api/*",
|
"/api/*",
|
||||||
cors({
|
cors({
|
||||||
origin: 'https://money.koon.us',
|
origin: ['https://money.koon.us','http://localhost:8081'],
|
||||||
allowMethods: ["POST", "GET", "OPTIONS"],
|
allowMethods: ["POST", "GET", "OPTIONS"],
|
||||||
allowHeaders: ["Content-Type", "Authorization"],
|
allowHeaders: ["Content-Type", "Authorization"],
|
||||||
credentials: true,
|
credentials: true,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export default function Auth() {
|
|||||||
const onLogin = () => {
|
const onLogin = () => {
|
||||||
authClient.signIn.oauth2({
|
authClient.signIn.oauth2({
|
||||||
providerId: "koon-family",
|
providerId: "koon-family",
|
||||||
callbackURL: "http://localhost:8081"
|
callbackURL: process.env.NODE_ENV == 'production' ? 'https://money.koon.us' : "http://localhost:8081"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user