solidus icon indicating copy to clipboard operation
solidus copied to clipboard

Can not logout from the admin: No route matches [GET] "/logout"

Open msiddique opened this issue 3 years ago • 1 comments
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

  1. Go to '/admin'
  2. Login using admin credentials
  3. 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

msiddique avatar Apr 24 '22 07:04 msiddique

/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.

waiting-for-dev avatar Apr 25 '22 08:04 waiting-for-dev