StephenGrider / FullstackReactCode

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

Update passport-google-oauth20 for compatibility with the Google People API #66

Open bcalmac opened 4 years ago

bcalmac commented 4 years ago

The diff corresponds to the instructions from https://www.udemy.com/course/node-with-react-fullstack-web-development/learn/lecture/13890898#questions:

npm install passport-google-oauth20@2 --save

As it is now, if a new student tries to run the app, Google auth fails with:


GooglePlusAPIError: Legacy People API has not been used in project ************ before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=************ then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.
    at /Users/bcalmac/code-study/fullstack-stephen-grider/server/node_modules/passport-google-oauth20/lib/strategy.js:95:21
    at passBackControl (/Users/bcalmac/code-study/fullstack-stephen-grider/server/node_modules/oauth/lib/oauth2.js:132:9)
    at IncomingMessage.<anonymous> (/Users/bcalmac/code-study/fullstack-stephen-grider/server/node_modules/oauth/lib/oauth2.js:157:7)
    at IncomingMessage.emit (events.js:323:22)
    at endReadableNT (_stream_readable.js:1204:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)```