Skip to content

Instantly share code, notes, and snippets.

@toanalien
Last active September 20, 2015 14:57
Show Gist options
  • Save toanalien/bbf3469e206b97475235 to your computer and use it in GitHub Desktop.
Save toanalien/bbf3469e206b97475235 to your computer and use it in GitHub Desktop.
app.get('/auth/callback', function(req,res){
var optAuthorize = {
url: config.url_oauth,
method: 'POST',
form: {
grant_type: 'authorization_code',
code: req.query.code,
client_id: config.client_id,
client_secret: config.client_secret
}
};
request(optAuthorize, function(error, res, body) {
// làm thế nào để send body ra browser
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment