koa-passport-example
koa-passport-example copied to clipboard
Issue with "passport-google-auth"
If you got at least one of below things when making google sign in...
1. Failed to retrieve user profile Legacy People API has not been used in project... (in console) 2. Failed to obtain access token invalid_grant... (in console) 3. Internal server error (on browser)
I recommend you change dependency module "passport-google-auth" to "passport-google-oauth".
Then modify parts that the module used like this.
const GoogleStrategy = require("passport-google-oauth").OAuth2Strategy;
and follow here http://www.passportjs.org/docs/google/