I'm trying to learn how to handle OAuth with Express.js and React.js. The step i'm stuck on, is after the user accepts the scope delegation request, and is redirect back to an Express.js endpoint:router.get('oauth/callback', (req, res, next) => { If the react app is on domain.com, how do you do a redirect, AND send json data to the react app?I know res.json() sends json data. and res.redirect can direct to the domain. But I don't know how to do both.In my case the json data being sent back is a refresh token and initial access token.
Submitted August 18, 2020 at 02:48PM by javascript_dev
No comments:
Post a Comment