-
Notifications
You must be signed in to change notification settings - Fork 140
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
Conflicting Controllers with Devise & Devise Token Auth causing unwanted actions to be called #302
Comments
@arinhouck It'll be hard to see what's going on without more context. Is your project OS or could you recreate and share the issue in another project? thanks |
@jamesmk I can label the project as public temporarily as it doesn't have any business logic built in yet. I just setup the basic structure with public facing API for Customers using Devise Auth Token. Then used Apartment to build a multi-tenant database wrapping the Fae objects. So each tenant has there own Fae Admin Portal when a Business record is created. However Apartment in this equation should not affect the outcome. |
It wouldn't let me attach .json so I had to zip the file. Here is the request I am trying to make through Postman. |
I think it just clicked what I needed to do after sleeping on it and reading this repetitively. I fixed the issue by configuring
However will I see any side-effects to this is the real question? Fae seems to be working and my devise token auth no longer calls Fae::ApplicationController actions. EDIT: Restarted and now Fae does not work for Devise views so this is not a solution. |
Now my current issue is the Devise views that are overriding through Fae are overriding my default Devise views. Go to So if I set Now my issue is similar to heartcombo/devise#1984 and ankane/blazer#73, where somehow resource_path cannot be found in this context. However if I use With those paths resolved, I now have issues with However, now my devise layout is being overwritten by fae. UPDATE (alternative option to fix layout issue but has other side effects) So if I set READING FURTHER -- My temporary solution that solved both cases:
I changed generated my views for customers to use custom copies of fae's devise look and feel. Changed all paths to support customer_*.
Use the above controller
Change layout to support scoped_views as it was harcoded to be
|
@arinhouck Sounds like you've been on quite a journey, glad to see you're making progress. I was afraid that your original issues wasn't going to be the only one to come up in this setup. I don't know off hand what it would take to make this edge case any easier to integration, but I'm open to suggestions or better yet, a PR. I'd consider this type of support a feature request. If you managed to get this working with your custom setup, a brief doc in our tutorials section would be amazing! thanks |
Thanks again for the tutorial @arinhouck. I'm closing this one out. |
When I added Fae to an existing project that had Devise + Devise Token Auth for JSON API. Upon my request to my Customer Devise model (mounted by devise_auth_token). All
before_actions
from Fae's controller are being called.Any thoughts? Something to do with extending ApplicationController?
Ruby 2.3.1
Rails 5.0.5
Fae 1.5.1
Devise Auth Token 0.1.42
Devise 4.3.0
The text was updated successfully, but these errors were encountered: