authentication - how to use ember simple auth without ember cli or AMD -



authentication - how to use ember simple auth without ember cli or AMD -

we re-writing our web application in ember.js. utilize our rest api , api uses oauth 2.0 authentication system. now, trying utilize ember simple auth https://github.com/simplabs/ember-simple-auth , tried utilize https://github.com/vestorly/torii seems both needs have amd loader or ember cli. unfortunately not using of them. know people using authentication oauth2.0. in advance.

update: downloaded ember simple auth 0.7.0 distribution. how configure ember application. tried utilize this; 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 session events session.on('sessionauthenticationsucceeded', function() { applicationroute.transitionto('index'); }); } }); var applicationroutemixin = requiremodule('simple-auth/mixins/application-route-mixin')['default'];

in route this:

app.applicationroute = ember.route.extend(simpleauth.applicationroutemixin, {});

@marcoow have illustration ?

ember simple auth has distribution exports global (simpleauth) - download here: https://github.com/simplabs/ember-simple-auth/releases/tag/0.7.0

you should utilize ember cli of course of study though...

authentication ember.js

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -