I have the following scenario:
- Rails app with User and Admin devise models, so I have two scopes.
-
Created on ember app on router:
Router.map(function() { this.route('panel', function() { this.route('login'); this.route('logout'); }); this.route('admin', function() { this.route('login'); this.route('logout'); }); }); -
I'm using
jj-abramsbranch once my app is Ember 2.0
Both authenticating on /users/sign_in and /admins/sign_in
I've made the steps on http://ift.tt/1i31E1F and authentication is working.
And ember is hitting the right urls after creating authenticators and adapters, but the problem is that ESA just have one session service, and once user or admin is logged in session.isAuthenticated is true and I don't know which scopes is logged in.
What is the best way to proceed:
- Add a
roleon user reply and set on session - Create a new session for admin user
Aucun commentaire:
Enregistrer un commentaire