For the ers internal use to sign in the offical api.
Auto finish oauth2 authentication process to get the access_token.
var router = Backbone.OAuthRouter.extend({
oauth: {
baseUrl: 'http://api_address',
clientId: 'your app id'
}
}
});
Auto decide show it or not depend on the user's permission
var view = Backbone.AccessView.extend({
render: function() {
return this;
}
})
sync server with the access_token automatically
var collection = Backbone.Collection.extend({
sync: Backbone.accessTokenSync
})
This lib will provide a window.me
object represent the logined user.