StephenGrider / FullstackReactCode

Companion repo to https://www.udemy.com/node-with-react-fullstack-web-development
1.39k stars 1.17k forks source link

Where does the "proxy" param in GoogleStrategy come from? #37

Open popo63301 opened 5 years ago

popo63301 commented 5 years ago

Hi!

I don't understand where have you found the proxy param that you've set in the GoogleStrategy.

https://github.com/StephenGrider/FullstackReactCode/blob/da3cbbc7e7bc0c35da0c151432360854f9c7ac03/server/services/passport.js#L24

Could you tell where it came from?

dhuang612 commented 5 years ago

the proxy param is for passport to know where to go depending on if you are in prod or dev. So what it is saying is if you run into a proxy trust it and try to use that first.

This handles our production environment in where we want the data to go to heroku's node server to seralize and de-seralize instead of our own local node environment.