Skip to content

Using netlifyIdentity.logout() does not clear the nf_jwt cookie. Site can still be accessed until cookie expiration. #502

Open
@FODS-LLC

Description

@FODS-LLC

Thank you for all the work you have put into building this identity tool. I have an observation about the netlifyIdentity.logout() function that I believe is a bug.

After logging in to the application using the widget, I end up with a cookie labeled nf_jwt and an entry in localStorage called gotrue.user and I can access the pages requiring permissions.

When I log out using netlifyIdentity.logout() function then the localStorage entry is cleared, but the cookie persists. I am able to navigate back to the protected pages.

I'm not sure if it is better to set the cookie expiration to a past time or delete the cookie on logout, but both seem to work for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions