function authorize(node) {
	//function authorize(credentials, callback) {
		var clientSecret = node.credentials.installed.client_secret;
		var clientId = node.credentials.installed.client_id;
		var redirectUrl = node.credentials.installed.redirect_uris[0];
		var auth = new googleAuth();
		node.oauth2Client = new auth.OAuth2(clientId, clientSecret, redirectUrl);

		// Check if we have previously stored a token.
		fs.readFile(TOKEN_PATH, function(err, token) {
		if (err) {
			getNewToken(node.oauth2Client, callback);
			//getNewToken(oauth2Client);
			} else {
			node.oauth2Client.credentials = JSON.parse(token);
//			callback(oauth2Client);
			}
		});
	}
/**
	* Create an OAuth2 client with the given credentials, and then execute the
	* given callback function.
	*
	* @param {Object} credentials The authorization client credentials.
	* @param {function} callback The callback to call with the authorized client.
	*/
Create an OAuth2 client with the given credentials, and then execute the
given callback function.

@param {Object} credentials The authorization client credentials.
@param {function} callback The callback to call with the authorized client.
Create an OAuth2 client with the given credentials and then execute the given callback function . @param { Object } credentials The authorization client credentials . @param { function } callback The callback to call with the authorized client .
function authorize(node) {
		var clientSecret = node.credentials.installed.client_secret;
		var clientId = node.credentials.installed.client_id;
		var redirectUrl = node.credentials.installed.redirect_uris[0];
		var auth = new googleAuth();
		node.oauth2Client = new auth.OAuth2(clientId, clientSecret, redirectUrl);
		fs.readFile(TOKEN_PATH, function(err, token) {
		if (err) {
			getNewToken(node.oauth2Client, callback);
			} else {
			node.oauth2Client.credentials = JSON.parse(token);
			}
		});
	}
function authorize ( node ) { var clientSecret = node . credentials . installed . client_secret ; var clientId = node . credentials . installed . client_id ; var redirectUrl = node . credentials . installed . redirect_uris [ 0 ] ; var auth = new googleAuth ( ) ; node . oauth2Client = new auth . OAuth2 ( clientId , clientSecret , redirectUrl ) ; fs . readFile ( TOKEN_PATH , function ( err , token ) { if ( err ) { getNewToken ( node . oauth2Client , callback ) ; } else { node . oauth2Client . credentials = JSON . parse ( token ) ; } } ) ; }
Create an OAuth2 client with the given credentials, and then execute the
 given callback function.
Create an OAuth2 client with the given credentials and then execute the given callback function .
//function authorize(credentials, callback) { // Check if we have previously stored a token. //getNewToken(oauth2Client); //			callback(oauth2Client);