we are re-writing our web application in ember.js. we use our rest api and the api uses oAuth 2.0 authentication system. Now, we are trying to use ember simple auth https://github.com/simplabs/ember-simple-auth and we also tried to use https://github.com/Vestorly/torii but it seems both needs to have AMD loader or ember cli. Unfortunately we are not using any of them. I would like to know what people using for authentication for oAuth2.0. Thanks in advance.
Update: I downloaded ember simple auth 0.7.0 from distribution. But how do I configure with my ember application. I tried use it like this; But it didn't work.
Ember.Application.initializer({
name: 'authentication',
after: 'simple-auth',
initialize: function(container, application) {
var applicationRoute = container.lookup('route:application');
var session = container.lookup('simple-auth-session:main');
// handle the session events
session.on('sessionAuthenticationSucceeded', function() {
applicationRoute.transitionTo('index');
});
}
});
var ApplicationRouteMixin = requireModule('simple-auth/mixins/application-route-mixin')['default'];
in my route like this:
App.ApplicationRoute = Ember.Route.extend(SimpleAuth.ApplicationRouteMixin, {});
@marcoow do you have any example ?