From 064318ea92196d4ef6f87a3f363c049fd1976eb9 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Tue, 3 Dec 2024 21:55:02 +0530 Subject: [PATCH] feat: redirect based on PUBLIC_URL --- server/src/routes/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/routes/auth.ts b/server/src/routes/auth.ts index 692add99..cc3d879b 100644 --- a/server/src/routes/auth.ts +++ b/server/src/routes/auth.ts @@ -384,7 +384,7 @@ router.get( httpOnly: false, maxAge: 60000, }); - res.redirect(`http://localhost:5173`); + res.redirect(process.env.PUBLIC_URL as string || "http://localhost:5173"); } catch (error: any) { res.status(500).json({ message: `Google OAuth error: ${error.message}` }); }