solidus
solidus copied to clipboard
Can not logout from the admin: No route matches [GET] "/logout"
trafficstars
Solidus Version:
*** LOCAL GEMS ***
solidus (3.1.5) solidus_api (3.1.5) solidus_auth_devise (2.5.4) solidus_backend (3.1.5) solidus_core (3.1.5) solidus_frontend (3.1.5) solidus_sample (3.1.5) solidus_support (0.8.1) To Reproduce
- Go to '/admin'
- Login using admin credentials
- Click Logout at the bottom of the sidebar
Current behavior
User gets the following error:
Routing Error
No route matches [GET] "/logout"
Expected behavior
The user should be logged out and redirected to the homepage or the/admin page
/logout endpoint is a DELETE one, not GET. It looks like you're missing requiring rails-ujs, or maybe you have a previous JS error that is making it unavailable. Please, see https://guides.rubyonrails.org/form_helpers.html#how-do-forms-with-patch-put-or-delete-methods-work-questionmark.