Here in the GET
/facebook
route i receive the authorization code from front-end after receiving that, i have to make a POST
request to /facebook/signin
How can I redirect GET
/facebook
to POST
/facebook/signin
router.get('/facebook', (req, res) => {
// res.send(req.query.code);
res.redirect('/facebook/sign'); // = GET /facebook/sign
});
POST
route
router.post('/facebook/sign', (req, res, next) => {
console.log(req.query.code);
// i will do mine stuff....
});