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 81,842+ developers who get early access to new tutorials, screencasts, articles, and more.

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

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.