Closed pkearney13 closed 4 years ago
Hey @pkearney13, this is expected with the current code
Simply add cookie.maxAge
to a value (in second) to make the session remembered or else it will default to browser session (removed when browser is closed). See this.
But I agree that the session should be remembered. I will add a PR soon or feel free to do so!
Ahhh that makes sense! I am following nextjs-mongodb-app
as a template for a project I am building. I will add a PR if I get a chance thanks! 😄
Describe the bug If you have logged into https://nextjs-mongodb.now.sh/ and quit chrome (completely quit the application) and you revisit the site https://nextjs-mongodb.now.sh/ your session is no longer valid and you need to log in again.
My understanding of sessions was that it would keep you logged in unless you log out or your session token expires?
To Reproduce Steps to reproduce the behavior:
Expected behavior Revisiting the site should keep you logged in
Desktop (please complete the following information):