-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update FAQ method for using DeviseTokenAuth alongside Devise #1175
Update FAQ method for using DeviseTokenAuth alongside Devise #1175
Conversation
docs/faq.md
Outdated
|
||
Some users have been experiencing issues with using this gem alongside standard Devise, with the `config.enable_standard_devise_support = true` method. | ||
|
||
Another method suggested by [jotolo](https://github.com/jotolois) is to have separate child `application_controller.rb` files that use either DeviseTokenAuth or standard Devise, which all inherit from a base `application_controller.rb` file. For example, you could have an `api/v1/application_controller.rb` file for the API of your app (which would use Devise Token Auth), and a `admin/application_controller.rb` file for the full stack part of your app (using standard Devise). The idea is to redirect each flow in your application to the appropriate child `application_controller.rb` file. Example code below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/jotolo
is the right address ;) Thank you for the mention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for catching that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the approach I would recommend, thanks. Do you have enable_standard_devise_support
disabled?
@MaicolBen Yes, I have
|
Several users have been experiencing problems using DeviseTokenAuth alongside Devise.
config.enable_standard_devise_support = true
. This isn't working for some, and it's noted as a "highly experimental" feature in the initializer.This new method example was given by jotolo, and it seems like a good approach to have in the FAQ docs. It's the most updated solution in this this thread on using Devise alongside DeviseTokenAuth: Having both devise and devise_token_auth #120 (comment)