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

Logout no longer works #511

Closed
yan12125 opened this issue Jul 20, 2024 · 2 comments · Fixed by #518
Closed

Logout no longer works #511

yan12125 opened this issue Jul 20, 2024 · 2 comments · Fixed by #518
Labels

Comments

@yan12125
Copy link

Login works fine. However, when I clicked Logout, it shows an empty page, and I see an HTTP/2 405 error in Firefox devtools.

@jelly jelly added the bug label Jul 22, 2024
@jelly
Copy link
Member

jelly commented Jul 22, 2024

The logout button does a GET and it re-uses and calls a Django internal function which has this lovely comment:

    # RemovedInDjango50Warning: when the deprecation ends, remove "get" and
    # "head" from http_method_names.
    http_method_names = ["get", "head", "post", "options"]

@jelly
Copy link
Member

jelly commented Jul 22, 2024

Support for logging out via GET requests in the django.contrib.auth.views.LogoutView and django.contrib.auth.views.logout_then_login() is removed.

With no alternative mentioned.

jelly added a commit to jelly/archweb that referenced this issue Jul 22, 2024
We can no longer logout with a GET and as folks probably don't want to
depend on JavaScript for logging out, add a form and style the input as
an anchor to make POST'ing work.

Closes: archlinux#511
@jelly jelly closed this as completed in 31333d3 Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants