Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

Spree backend user session fallback root path is not admin_path #535

Description

@bhtabor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions