ember-cli-simple-auth-kinvey
v0.0.2
Published
Kinvey integration for Ember Simple Auth
Downloads
9
Maintainers
Readme
ember-cli-simple-auth-kinvey
Ember Simple Auth integration for Kinvey
Installation
ember install:addon ember-cli-simple-auth-kinvey
Configuration
// config/environment.js
module.exports = function(environment) {
var ENV = {
// ...
'simple-auth': {
authorizer: 'simple-auth-authorizer:kinvey',
crossOriginWhitelist: ['https://baas.kinvey.com']
},
'simple-auth-kinvey': {
appKey: 'appKey',
appSecret: 'appSecret',
}
// ...
},
// ...
};
Usage
Login
//...
this.get('session').authenticate('simple-auth-authenticator:kinvey', {
username: username,
password: password
});
Signup
//...
this.get('session').authenticate('simple-auth-authenticator:kinvey', {
username: username,
password: password,
_isSignup: true
});
Logout
//...
this.get('session').invalidate();