@@ -41,8 +41,11 @@ func forwardResponseHandlerLoginLocalUser(md metadata.MD, w http.ResponseWriter)
http.SetCookie(
w,
&http.Cookie{
- Name: "olivetin-sid-local",
- Value: sid,
+ Name: "olivetin-sid-local",
+ Value: sid,
+ MaxAge: 31556952, // 1 year
+ HttpOnly: true,
+ Path: "/",
},
)
}
@@ -96,7 +96,7 @@ func setOauthCallbackCookie(w http.ResponseWriter, r *http.Request, name, value
cookie := &http.Cookie{
Name: name,
Value: value,
- MaxAge: int(time.Hour.Seconds()),
Secure: r.TLS != nil,
HttpOnly: true,
Path: "/",