UPDATE: try fix cookie
Some checks failed
Build and Release / release (push) Has been cancelled

This commit is contained in:
2026-03-31 22:29:55 +07:00
parent 58764a42ea
commit 08f56bdd14

View File

@@ -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{
@@ -419,13 +419,15 @@ func (h *AuthController) GoogleCallback(c fiber.Ctx) error {
allowed := map[string]bool{
"http://localhost:3000": true,
"https://localhost:3000": true,
"http://localhost:3001": true,
"https://localhost:3001": true,
"http://localhost:5500": true,
"https://app.yourdomain.com": true,
}
redirectURL := data.RedirectURL
if !allowed[redirectURL] {
redirectURL = "http://localhost:3000"
redirectURL = "https://localhost:3000"
}
return c.Redirect().To(redirectURL)