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QdD1E7CBEcLP_RuBvw8vSQ_CQAceJ9DguHo1GsOH0fuqKhVgpoU3xBRrx-p9_WyMtN7qCYvEv6JDH-Lp_TjmXvz9qBmVU_nDLgn3Oxw8XhZKg";
var miCredencial = "879204284051-ggu11jpg089n5voslom9s14knka0ca99.apps.googleusercontent.com";
var userId = "104128311395160365072";
var contador = 0;

exports.signin = function(req, res) {

	console.log("POST agenda Singing in: --------------------------------------->");
	var qs = JSON.stringify(req.body);
	console.log("###########query string: ", qs);
	console.log("********req.body.userId: ", req.body.userId);
	/*

	console.log("******************req.body.tokenId: ", req.body.tokenId);
	console.log("Respuesta al signin: " + JSON.stringify(accountProfile));
	*/

	/*
	var i = 0;
	var j = 0;

	console.log(res.headersSent);
	while(j<100){
		while(i<10000000){
			i++;
		}
		i = 0;	
		j++;	
	}

	res.append('Warning', '199 Miscellaneous warning');
	*/
	res.send("Hola " +  contador);
	contador++;
};
