vorum icon indicating copy to clipboard operation
vorum copied to clipboard

Cookies are not set

Open davtur19 opened this issue 5 years ago • 10 comments

In the previous version cookies were set, after updating they are no longer set, and therefore I can no longer log on to the vorum that I am hosting In the console no errors appear and the variables seem correct (I did some small tests printing them in console)

davtur19 avatar Dec 11 '19 02:12 davtur19

Secure cookies are used now, need to detect dev environment, and not use them there. Will fix today.

medvednikov avatar Dec 11 '19 10:12 medvednikov

I recompiled v removing "secure" from the cookie header and now cookies are set However, it's like I'm not logged in anyway

Now I try to put vorum behind a nginx proxy to see if anything changes

davtur19 avatar Dec 11 '19 17:12 davtur19

After having reset the db and with the cookies working, this appears in the console: user not found (id = 1, random_id = HArizBDdk29f3S0A99tD) I checked the database and the values are correct

davtur19 avatar Dec 11 '19 18:12 davtur19

@davtur19 sorry for the delay, should be fine now..

Can you try again?

medvednikov avatar Dec 13 '19 18:12 medvednikov

Same problem I tried this:

./v up
cd ../vorum/
../v/v .
# reset database
psql -f init_postgres_db.sql -d vorum
git pull
./vorum

davtur19 avatar Dec 13 '19 19:12 davtur19

I assume you set the cookie with a browser extension, or with the developer's console, right?

medvednikov avatar Dec 13 '19 19:12 medvednikov

I reset them with the console (firefox developer edition)

davtur19 avatar Dec 13 '19 20:12 davtur19

I tried also on chrome, with incognito mode

davtur19 avatar Dec 13 '19 20:12 davtur19

After having reset the db and with the cookies working, this appears in the console: user not found (id = 1, random_id = HArizBDdk29f3S0A99tD) I checked the database and the values are correct

I was referring to this problem in the previous comments, cookies work properly using nginx as a proxy

Without proxy (http): it still doesn't work (even in other browsers and incognito mode) image

davtur19 avatar Dec 13 '19 20:12 davtur19

Very strange, works fine for me locally (no proxy), and on forum.vlang.io (nginx).

medvednikov avatar Dec 13 '19 23:12 medvednikov