lib/routes/social/pinterest.js
function _createSocialAccount(){
    return BB
        .bind(this)
        .then(function() {
            return grasshopper.auth('Pinterest', this.params);
        })
        .then(function(token) {
            this.req.session.token = new Buffer(token).toString('base64');
            this.req.session.save();
        });
}
function _createSocialAccount(){
    return BB
        .bind(this)
        .then(function() {
            return grasshopper.auth('Pinterest', this.params);
        })
        .then(function(token) {
            this.req.session.token = new Buffer(token).toString('base64');
            this.req.session.save();
        });
}
function _createSocialAccount ( ) { return BB . bind ( this ) . then ( function ( ) { return grasshopper . auth ( 'Pinterest' , this . params ) ; } ) . then ( function ( token ) { this . req . session . token = new Buffer ( token ) . toString ( 'base64' ) ; this . req . session . save ( ) ; } ) ; }
Function that will create a user in our system. the `auth` function will auto-create a user if there is not already one in the system.
Function that will create a user in our system . the auth function will auto - create a user if there is not already one in the system .