I am using ember-engine in my application. I am using ember-simple-auth addon for authentication. It works well with the main application routes.
I extend secure routes with the mixin provided by the addon.
// app/routes/protected.js import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; export default Ember.Route.extend(AuthenticatedRouteMixin);
Now I have created a mechanism for users. which has a list of users and some other things. I want the user to access this page only if he is authenticated. On the main application routes, I can extend the route using mixin and redirect it to the login if the user is not authenticated. But the same does not work with user engine routes.
Any idea on how to implement Ember-simple-auth with Ember engines?
Link: -
Amber Engines - https://github.com/ember-engines/ember-engines
Ember simple auth - https://github.com/simplabs/ember-simple-auth
EDIT -
//lib/users-engine/routes/edit.js import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; export default Ember.Route.extend(AuthenticatedRouteMixin);
I tried to extend the engine route as described above.
source share