auth.js
function(token) {
        this.oauthClient.setCredentials(token);
        this.brain.set(this.TOKEN_KEY, token.access_token);
        if (token.refresh_token) {
            this.brain.set(this.REFRESH_KEY, token.refresh_token);
        }
        this.brain.set(this.EXPIRY_KEY, +token.expiry_date);
        this.brain.save();
        this.brain.resetSaveInterval(60);
    }
function(token) {
        this.oauthClient.setCredentials(token);
        this.brain.set(this.TOKEN_KEY, token.access_token);
        if (token.refresh_token) {
            this.brain.set(this.REFRESH_KEY, token.refresh_token);
        }
        this.brain.set(this.EXPIRY_KEY, +token.expiry_date);
        this.brain.save();
        this.brain.resetSaveInterval(60);
    }
function ( token ) { this . oauthClient . setCredentials ( token ) ; this . brain . set ( this . TOKEN_KEY , token . access_token ) ; if ( token . refresh_token ) { this . brain . set ( this . REFRESH_KEY , token . refresh_token ) ; } this . brain . set ( this . EXPIRY_KEY , + token . expiry_date ) ; this . brain . save ( ) ; this . brain . resetSaveInterval ( 60 ) ; }
Stores the token and expire time into the robot brain and
Sets it in the oauthClient

@param  token  the token object returned from google oauth2
Stores the token and expire time into the robot brain and Sets it in the oauthClient