You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is easily replicated when spree_backend is set up with spree_auth_devise. I.e. without spree_frontend the / url is not available. If we then go to /admin, that redirects us to /admin/login and then returns us to /admin when logged in.
Now, if we log out and then log in, there is no session return path. It just tries to go to / and then error out if we don't have a spree_frontend or a landing page. Plus going to / while trying to login to /admin (even after the logging out) might not make much sense.
This is easily replicated when spree_backend is set up with spree_auth_devise. I.e. without spree_frontend the / url is not available. If we then go to /admin, that redirects us to /admin/login and then returns us to /admin when logged in.
Now, if we log out and then log in, there is no session return path. It just tries to go to / and then error out if we don't have a spree_frontend or a landing page. Plus going to / while trying to login to /admin (even after the logging out) might not make much sense.
It is better if it goes to the Spree.admin_path when on the backend admin session controller https://github.com/spree/spree_auth_devise/blob/master/lib/controllers/backend/spree/admin/user_sessions_controller.rb.
Devise already supports fallback to a root_path when available. https://github.com/heartcombo/devise/blob/master/lib/devise/controllers/helpers.rb#L181
The text was updated successfully, but these errors were encountered: