Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session cookie not recreated if cleared in the browser #359

Open
clubside opened this issue May 23, 2024 · 0 comments
Open

Session cookie not recreated if cleared in the browser #359

clubside opened this issue May 23, 2024 · 0 comments

Comments

@clubside
Copy link

Howdy!

I'm working on adding sessions to my fastify app and in the course of testing I used the Application tab of DevTools to clear the cookies by right-clicking on it in the left pane and choosing "Clear". Now any visit to the server leaves the cookie empty. How can I get the cookie (and the all-important session id) recreated?

On a side node, it's quite maddening coming from a standard server session environment where session variables are persisted across requests. As your own sample https://github.com/fastify/example/tree/master/fastify-session-authentication shows, after logging in successfully just refreshing the page shows you as logged out. Because of this I assume I have to track the sessions myself and store the variables related to each id. Obviously people are using fastify and fastify-session in the wild, just frustrated there is no simple real-world logging in and maintaining session variables until logged out example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant