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] Logout button not working when the Keep me logged in button is not checked #313

Closed
jonas-martinez opened this issue Dec 30, 2022 · 1 comment · Fixed by #345
Closed
Assignees
Labels
bug Something isn't working

Comments

@jonas-martinez
Copy link
Collaborator

The logout button is not working when the Keep me logged in button is not checked.

Scenario 1

I check the box keep me logged in and connect, I click on the logout button it works fine.

Scenario 2

I don't check the keep me logged in box and I log in. When I click on the logout button there is a 401 Unauthorized error on the /auth/logout, the server returns You are not authenticated.

How to fix the issue

It seems that this problem is due to the pipeline :ensure_auth_refresh that is just above the /auth/logout route. In fact, this pipeline checks if a cookie exists but by not checking the Keep me logged in box there is no cookie. This is causing the pipeline to return 401 Unauthorized.

@jonas-martinez jonas-martinez added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Dec 30, 2022
@jonas-martinez jonas-martinez changed the title [Task] Logout button not working when the Keep me logged in button is not checked [Bug] Logout button not working when the Keep me logged in button is not checked Dec 30, 2022
@taorepoara
Copy link
Member

There should be a cookie in both cases. The difference is the duration of the cookie. If the Keep me logged in is checked, the duration is 30 days, if not, the duration is the user session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants