You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
err := gothic.StoreInSession("test", "test-value, req, res)
if err != nil {
fmt.Println("error storing client in session: ", err)
return
}
val, err := GetFromSession("test", req)
if err != nil {
fmt.Println("error retrieving value for 'test' that was just set: ", err)
}
// GetFromSession fails 100% of the time
The text was updated successfully, but these errors were encountered:
I am having this same issue. For me it is setting the cookies path to the current path which deletes it right away.
If I manually set the path using the session store it will set a cookie and keep it. However if you try and call it again right after to populate the value it will reset the path.
StoreInSession("path", "/", r, w)
This will create a cookie with a path "/" and it will persist.
StoreInSession("value", "somevalue", r, w)
The previous cookie is overwritten and the current path written which deletes the cookie instantly
The text was updated successfully, but these errors were encountered: