question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The cookies cannot be deleted on logout

See original GitHub issue

https://github.com/iMerica/dj-rest-auth/blob/8a460ecf9a72aec269b75160e5c97f7ed608e247/dj_rest_auth/jwt_auth.py#L60 https://github.com/iMerica/dj-rest-auth/blob/8a460ecf9a72aec269b75160e5c97f7ed608e247/dj_rest_auth/jwt_auth.py#L62

Please add samesite parameter to the delete_cookie function, because in Chrome for example the cookie cannot be deleted. When i add samesite='None' all is okay.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
sadikuarcommented, Sep 6, 2021

I currently have the same problem.

However, this issue is not limited to Google Chrome for me as I have tested the /logout endpoint on Firefox and it doesn’t work either.

I have tested the login and logout on Postman and it works perfectly :

  • Login : Cookies are set by the server image

  • Logout : Cookies are deleted without any issue image

  • The logout response headers image

Using my frontend app. :

  • Login : response headers > Cookies image

image

  • Logout : response headers > Cookies. Here the sessionid Cookie removal seems to be missing for unknown reasons (even though it is present in the Postman response) image

image

  • Checking the Cookies in the browser and they’re still set with the initial expiration date image

image

I’m quite confused on what’s happening here…

0reactions
DarnellSylvaincommented, Oct 21, 2022

Any new on this? I am facing the same issue. The Set-Cookie Header on the /logout is SameSite =“lax” but I’ve set cookies to None.

/login route comes back with SameSite=None and Secure, but logout doesnt even though its the same cookie its affecting and same header

Read more comments on GitHub >

github_iconTop Results From Across the Web

Delete Cookies on Logout - Auth0 Community
I would like to have all cookies related to a users session deleted upon logout, but it does not appear that the auth0-js...
Read more >
c# - Not able to delete the cookies on logout - Stack Overflow
On Login Index when I check the current login cookie value it always has the value of the logged in user is just...
Read more >
Should I clear browser cookies or log out manually if I want to ...
If you do not logout but only clear the cookies then the website still stores your session ID, so best is to logout...
Read more >
Logout not working, .AspNet.ApplicationCookie is not being ...
Try to remove forcefully cookies from the browser on signout action and ... However I cannot find anything related to a logout in...
Read more >
Cookie not being removed from browser upon logout - AskF5
If the Set-Cookie from the server originally has a domain and path set, but the Set-Cookie which later attempts to delete that cookie...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found