0.0.2 • Published 9 years ago

ember-cli-simple-auth-kinvey v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

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();