-
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
I have a rails backend rendered app (erb). Can I switch to devise token auth? #196
Comments
Why do you want to use this gem instead of Devise ? What are your troubles ? |
Actually, I have a coupled version of rails-angular. |
I was working on a similar case where I needed to use both, devise+devise_token_auth in a spree application. I was trying to implement authentication for spree_api and migrating the authentication of spree system(Full Stack App) to devise.
In the API controller I included the regular DeviseTokenAuth concern to manage auth in the app that controls this application_controller.rb. Note that this controller inherits from the main application_controller.
This controller is, well, natural behavior of devise. I just needed to add the before action method.
Our main application_controller.rb looks like this. You need to keep the CSRF token protection but you can avoid it when an API request arrive. |
Hi there @casertap , In an effort to cleanup this project and prioritize a bit, we're marking issues that haven't had any activity in a while with a "close-in-7-days" label. If we don't hear from you in about a week, we'll be closing this issue. Obviously feel free to re-open it at any time if it's the right time or this was done in error! If you are still having the issue (especially if it's a bug report) please refer to our new Issue Template to provide some more details to help us solve it. Hope all is well. |
I would like to know if it is possible to use token auth on a simple rails application (no api, no angular, just simple .erb views)?
I have some trouble implementing it.
The text was updated successfully, but these errors were encountered: