From 08f56bdd14a154b0e812814fe8087002df7d3d7d Mon Sep 17 00:00:00 2001 From: AzenKain Date: Tue, 31 Mar 2026 22:29:55 +0700 Subject: [PATCH] UPDATE: try fix cookie --- internal/controllers/authController.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/internal/controllers/authController.go b/internal/controllers/authController.go index 9d8c820..32d5b84 100644 --- a/internal/controllers/authController.go +++ b/internal/controllers/authController.go @@ -309,7 +309,7 @@ func (h *AuthController) GoogleLogin(c fiber.Ctx) error { redirect := c.Query("redirect") if redirect == "" { - redirect = "http://localhost:3000" + redirect = "https://localhost:3000" } data := models.OAuthState{ @@ -418,14 +418,16 @@ func (h *AuthController) GoogleCallback(c fiber.Ctx) error { }) allowed := map[string]bool{ - "http://localhost:3000": true, - "http://localhost:5500": true, - "https://app.yourdomain.com": true, + "http://localhost:3000": true, + "https://localhost:3000": true, + "http://localhost:3001": true, + "https://localhost:3001": true, + "http://localhost:5500": true, } redirectURL := data.RedirectURL if !allowed[redirectURL] { - redirectURL = "http://localhost:3000" + redirectURL = "https://localhost:3000" } return c.Redirect().To(redirectURL)