lib/security/providers/facebook.js
function _createNewToken() {
    var token = uuid.v4(),
        newTokenObj = {
            _id: crypto.createHash(token, config.crypto.secret_passphrase),
            uid: this.userInfo._id.toString(),
            created: new Date().toISOString(),
            type: 'facebook'
        };

    return db.tokens.insert(newTokenObj).then(function() { return token; });
}
function _createNewToken() {
    var token = uuid.v4(),
        newTokenObj = {
            _id: crypto.createHash(token, config.crypto.secret_passphrase),
            uid: this.userInfo._id.toString(),
            created: new Date().toISOString(),
            type: 'facebook'
        };

    return db.tokens.insert(newTokenObj).then(function() { return token; });
}
function _createNewToken ( ) { var token = uuid . v4 ( ) , newTokenObj = { _id : crypto . createHash ( token , config . crypto . secret_passphrase ) , uid : this . userInfo . _id . toString ( ) , created : new Date ( ) . toISOString ( ) , type : 'facebook' } ; return db . tokens . insert ( newTokenObj ) . then ( function ( ) { return token ; } ) ; }
Function will create a new access token in grasshopper and return it to the app
Function will create a new access token in grasshopper and return it to the app