Use DELETE requests for logging out

Description

How to test:

  • Log out as a user (with and without JS enabled)

  • Log out as an admin (with and without JS enabled)

Activity

Show:
redsummernight
May 16, 2020, 11:00 AM

To avoid the styling changes, you could use link_to's method to make the link work when JS is enabled, and add a GET page with a logout form (“are you sure you want to log out?“) as the fallback when JS is not enabled. It’s similar to how we set up the login page.

Thanks for tracking down the no-JS non-GET issues! It’s a pretty widespread problem, we can have another issue (or many), but you don’t have to deal with them here.

Alix R
September 13, 2020, 7:13 AM
Edited

Due to RL stuff, I unfortunately won't be able to work on this anymore. Closing the PR and unassigning the Jira issue, whoever wants to pick it back up can take a look at my code I guess.

Sarken
December 5, 2020, 9:06 PM

reviewer: redsummernight

Note that PR requests we credit Alix R.

redsummernight
December 11, 2020, 3:53 PM
  • The top-right “Log Out” link looks the same with or without JS.

  • Logging out works with JS as usual.

  • Without JS, “Log Out” leads to a new page with a log out form using method='post'. “Yes, Log Out“ correct logs me out.

Looks good.

Sarken
December 16, 2020, 1:15 PM

Tested as a user and an admin, with and without JavaScript. I was able to log out as expected every time. The new log out page looked good even when shrinking my browser window to resemble a phone’s width.

This is ready for release!

DeployedToBeta

Assignee

ticking instant

Reporter

redsummernight

Roadmap

Login

Priority

High

Affects versions

Fix versions

Components

BackEnd

Difficulty

Medium

Milestone

Internal 0.9