Skip to content

Instantly share code, notes, and snippets.

@paulbatum
Created January 27, 2016 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulbatum/f61569a9eff37aeaa1f5 to your computer and use it in GitHub Desktop.
Save paulbatum/f61569a9eff37aeaa1f5 to your computer and use it in GitHub Desktop.
var request = require('request');
module.exports = {
"post": function (req, res, next) {
req.azureMobile.user.getIdentity("google").then(function(result) {
request.get('https://www.googleapis.com/plus/v1/people/me', {
headers: {
"Authorization": "Bearer " + result.google.access_token
}
}, function(err, apiResult) {
var results = JSON.parse(apiResult.body);
res.send(apiResult.statusCode, { result: results });
});
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment