Handling user authentication when using ember.js

前端 未结 4 2046
滥情空心
滥情空心 2021-01-30 04:11

I was looking up documentation and posts on ember.js, and using ember.js with Rails.

I like the idea of Rails providing the API, and ember.js handling the UI, but I was

4条回答
  •  孤街浪徒
    2021-01-30 05:09

    One option (not always ideal in all situations) is to initialize the Ember app in a view that requires an active session in Devise to render.

    I often do this by keeping the ember app's js/css manifest out of the load path except in a view that sits under an authenticated controller in the Rails app.

    You can also protect any data from loading in the Ember app by putting Devise authentication checks on the Rails controllers that populate your data.

提交回复
热议问题