Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logout_path should be configurable #3660

Open
siba2893 opened this issue Nov 29, 2023 · 1 comment
Open

logout_path should be configurable #3660

siba2893 opened this issue Nov 29, 2023 · 1 comment

Comments

@siba2893
Copy link

Describe the bug
Currently I have Devise Token Auth for my API para of the app. But because configuring devise to work with Active Admin without overlapping with the parent controller of both Devise instances is a nightmare. I went and used Sorcery for the auth on the Rails Admin side.

The problem is that Rails Admin is tightly coupled to Devise for the logout_path. In my specific scenario I do have Devise defined so the code

 def logout_path
      if defined?(Devise)
        scope = Devise::Mapping.find_scope!(_current_user)
        begin
          main_app.send("destroy_#{scope}_session_path")
        rescue StandardError
          false
        end
      elsif main_app.respond_to?(:logout_path)
        main_app.logout_path
      end
    end
    ```

Will always try to go that way. Leaving me without a way to use my own logout url.
@mshibuya
Copy link
Member

mshibuya commented Nov 29, 2023

What prevents you from defining logout_path as a route?
#2062

Ah sorry, you do have Devise so logout_path won't be taken into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants