refactor: generate a verifier on every oauth auth session

This commit is contained in:
Stavros
2025-10-19 19:03:32 +03:00
parent 97639ae903
commit 5482430907
5 changed files with 20 additions and 8 deletions

View File

@@ -72,6 +72,7 @@ func (controller *OAuthController) oauthURLHandler(c *gin.Context) {
return
}
service.GenerateVerifier()
state := service.GenerateState()
authURL := service.GetAuthURL(state)
c.SetCookie(controller.config.CSRFCookieName, state, int(time.Hour.Seconds()), "/", fmt.Sprintf(".%s", controller.config.CookieDomain), controller.config.SecureCookie, true)