ruby-on-railsdeviserails-adminrails-apiclearance

Rails 5 API app returning white screen with Devise sign_in page


I am working on a Rails 5 API only app using JWT tokens.

I'd like to use Rails Admin for internal processes and would like to configure Devise (or Clearance) for auth for staff members instead of integrating JWT tokens with Rails Admin directly.

The problem I have is once I set up Devise or Clearance (the controllers, models, and routes are there) the sign in screens return an empty HTML page.

There are some related issues with Clearance mentioned in https://github.com/thoughtbot/clearance/issues/741 but I've been unable to figure out why the HTML does not load.

The Rails API does exclude some middleware but it's not clear to me which is missing or causing the issue. Thanks.


Solution

  • I solved the problem by converting the Rails API only app to be a normal Rails app. Not the best solution, in my opinion, but it works!