Skip to content

Session cookie not recreated if cleared in the browser #359

@clubside

Description

@clubside

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions