Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I use Devise in normal AND API mode

Jaroslav Horák asked in Rails

Hi guys,
I want to use Devise for creating users with mobile app via REST API but I also want use it in classic fashion.
So in API I want to return JSON and appropriate HTTP codes. Also I want to issue JWT token for authentication for mobile app.
On web I want normal devise functionality.
How I should structure controllers, router and other stuff? I cant find any good resources about this.
Thank you guys.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 84,387+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.