Monday 8 May 2017

Dynamic redirect url through oAuth2.0

Hi I am making authentication using oAuth2.0 protocol in Node.js. What I want to build is make a widget for example something like facebook embeddable like button.

Thus, the button could be everywhere mostly in individual's blog. When the embedded button has been clicked, the user will see the login popup where google button is also available. But since, the button is embedded in 3rd place, it will redirect to other API I have prebuilt and it contains all the backend logic for oAuth2.0 protocol.

The problem is I am having trouble in redirecting to where the request has been originated. I use passport.js and express. Even if I tried to find the request origin through "req.headers", it returns the API's header information, not the actual individual's blog url.

Is there anybody who have clue to solve this problem? Thanks a lot guys!



via Hoseong Asher Lee

No comments:

Post a Comment