From eb36b2211b32bedfa372e81719d1717b1ebc05b5 Mon Sep 17 00:00:00 2001 From: Stavros Date: Mon, 14 Apr 2025 19:45:50 +0300 Subject: [PATCH] chore: cleanup redirect cookie --- internal/handlers/handlers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index d4b0308..7e15ca3 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -653,6 +653,9 @@ func (h *Handlers) OauthCallbackHandler(c *gin.Context) { return } + // Clean up redirect cookie + c.SetCookie("tinyauth-redirect", "", -1, "/", "", h.Config.CookieSecure, true) + // Redirect to continue with the redirect URI c.Redirect(http.StatusPermanentRedirect, fmt.Sprintf("%s/continue?%s", h.Config.AppURL, queries.Encode())) }