fix(oauth): escape json string so it can be set by http package

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-07-24 19:08:18 -03:00
parent cd2f58a24c
commit ae3dae1ffa

View File

@@ -125,7 +125,7 @@ func (c DefaultOAuthClient) ServeHTTP(w http.ResponseWriter, r *http.Request) {
http.SetCookie(w, &http.Cookie{
Name: "__Host-OAUTH-" + strings.ToUpper(c.Name),
Value: string(cv),
Value: url.PathEscape(string(cv)),
SameSite: http.SameSiteStrictMode,
Path: "/",
Secure: true,