creativetimofficial / argon-dashboard-nodejs

MIT License
144 stars 291 forks source link

Session/Cookie Issue #5

Closed Ray-Sutton closed 4 years ago

Ray-Sutton commented 5 years ago

Hi! Love the template, it's been an amazing help. I have my Redis server running in dev, and added one in production with Heroku Redis. But for some reason, my production setup isn't setting cookies and when I log in, it redirects me to the home page and the user isn't authenticated.

I ran into the same issue when I was using Docker in development and switched to a local pg database. Any ideas on things to check? @timcreative @dragosct10

Ray-Sutton commented 5 years ago

Hi! @timcreative

For whatever reason, the production session is trying to use the url from the localhost. Any insight into fixing this?

Heroku Logs:

2019-11-09T17:22:06.239759+00:00 heroku[web.1]: Starting process with command npm start 2019-11-09T17:22:08.844732+00:00 app[web.1]: 2019-11-09T17:22:08.844757+00:00 app[web.1]: > argon-dashboard-nodejs@1.0.1 start /app 2019-11-09T17:22:08.844760+00:00 app[web.1]: > node ./bin/www 2019-11-09T17:22:08.844761+00:00 app[web.1]: 2019-11-09T17:22:09.818497+00:00 app[web.1]: Redis error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379 2019-11-09T17:22:09.818542+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1128:14) { 2019-11-09T17:22:09.818545+00:00 app[web.1]: errno: 'ECONNREFUSED', 2019-11-09T17:22:09.818547+00:00 app[web.1]: code: 'ECONNREFUSED', 2019-11-09T17:22:09.818549+00:00 app[web.1]: syscall: 'connect', 2019-11-09T17:22:09.818551+00:00 app[web.1]: address: '127.0.0.1', 2019-11-09T17:22:09.818553+00:00 app[web.1]: port: 6379 2019-11-09T17:22:09.818555+00:00 app[web.1]: }