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

Bug: Iron Session Cookie not destroyed on second logout attempt #5

Closed
kamescg opened this issue Jan 13, 2023 · 1 comment
Closed

Bug: Iron Session Cookie not destroyed on second logout attempt #5

kamescg opened this issue Jan 13, 2023 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kamescg
Copy link
Member

kamescg commented Jan 13, 2023

The SIWE flow uses iron-session to create a session using an encrypted cookie.

Normally we want to create this with httpOnly set too true.

Right now we are manually overriding default setting:
https://github.com/turbo-eth/template-web3-app/blob/main/lib/config.ts#L27

Why?

A bug is present causing the cookie not be removed upon the second logout request. I don't know why.

Instead the cookie is accessed from the browser/client and is destroyed manually, if the API /account/logout request fails. This is NOT SECURE and the bug needs to be fixed before a production application can use the boilerplate.

@kamescg kamescg added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Jan 13, 2023
@kamescg kamescg changed the title Bug: Iron Session Cookie not destroyed on second logout Bug: Iron Session Cookie not destroyed on second logout attempt Jan 13, 2023
@kamescg
Copy link
Member Author

kamescg commented Mar 26, 2023

Fixed

@kamescg kamescg closed this as completed Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant