If you’re using Rails & Devise for authentication, I just released a plugin that might help make your life a little easier. It provides the routing, models & callbacks necessary to handle sign in & sign out making ajax requests to Devise’s SessionsController. Check out the README for more details.
This file has been truncated.
A plugin that allows an Ember app to integrate with a (mostly stock) Devise setup.
## What it does
`app/routes/session.js` - The route that handles sign in. You will need to create a template named `sessions`.
`app/models/authenticator.js` - A plain object that provides the current signed-in state, along with methods to sign in/out and lookup the current user.
`config/initializers/authenticator.js` - Injects the authenticator into your routes & controllers so you have access to the signed-in state anywhere you are!
`config/initializers/csrf.js` - jQuery ajax response handler that reads new CSRF tokens handed in from devise (see [companion gem][companion_gem]).
`config/initializers/session-route.js` - Adds a route named "session" to your app's router. The path defaults to `/sign-in` but [is configurable][configurable].