The API docs for Ember Simple Auth Torii are available here
This is an extension to the Ember Simple Auth library that provides an authenticator that wraps torii and thus supports a variety of 3rd party authentication providers. For using this extension library the Ember.js application also needs to load the torii library.
Ember Simple Auth Torii requires Ember.js 1.6 or later!
In order to use the torii authenticator (see the
API docs for Authenticators.Torii
)
the application needs to configure one or more torii providers, e.g.:
ENV['torii'] = {
providers: {
'facebook-oauth2': {
apiKey: '631252926924840',
redirectUri: document.location.href
}
}
};
To use this provider to authenticate the Ember Simple Auth session simply pass
the provider's name to the authenticate
method of the session:
this.get('session').authenticate('simple-auth-authenticator:torii', 'facebook-oauth2');
To install Ember Simple Auth Torii in an Ember.js application there are several options:
-
If you're using Ember CLI, just add the Ember CLI Addon to your project and Ember Simple Auth Torii will setup itself.
-
The Ember Simple Auth Torii extension library is also included in the "ember-simple-auth" bower package both in a browserified version as well as an AMD build. If you're using the AMD build from bower be sure to require the autoloader:
require('simple-auth-oauth2/ember');
The browserified version will, like the Ember CLI addon, also setup itself once it is loaded in the application.
-
Download a prebuilt version from the releases page