-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userProfileURL is not working #83
Comments
passport.use(new GoogleStrategy({ |
userProfileURL is not working passport.use(new GoogleStrategy({ |
You don't need to use "userProfileURL" anymore, as the latest version (v2.0.0) of the npm package "passport-google-oauth20" solves the Google+ account issue which was there couple of years before. Please refer this article by one of the collaborators for more. |
The "userProfileURL" is no longer required, that issue came back in 2018, when google was deprecating it's google + services. This issue has been fixed now with the new npm package |
The issue was "Google+ deprecation " so this link was the solutions "userProfileURL:"https://www.googleapis.com/oauth2/v3/userinfo" for that . This issue was fixed we have no longer need this "userProfileURL". |
Register or Login button won't load to google auth login page import { Strategy as GoogleStrategy } from "passport-google-oauth20" passport.use(new GoogleStrategy({ app.get("/auth/google",function(req,res){ |
Even I am facing the same issue. My google auth wont work on both login and register page, but the other functionalities like login and register using mongodb works fine. Someone please help with this issue!! Reference: Currently doing the Angela Yu's Web Development course where she uses google oauth 2.0 to help in logging in with Google |
|
first part what to change? im not still not getting the proper output |
You no longer need to use "userProfileURL" because the most recent version (v2.0.0) of the npm package resolves the Google+ account issue that existed a few years ago. |
@ShubhamSharma2003 just use /auth/google/secrets in |
userProfileURL :"https://www.googleapis.com/oauth2/v3/userinfo" from GoogleStrategy. It is no longer needed. |
|
TokenError: Bad Request
const bodyparser = require('body-parser'); const app = express(); app.set('view engine', 'ejs'); app.use(bodyparser.urlencoded({extended:true})); app.use(session({ app.use(passport.initialize()); mongoose.connect('mongodb://127.0.0.1:27017/UserDB').then(()=>{ passport.use(user.createStrategy()); passport.serializeUser((user, done) => done(null, user)); passport.use(new GoogleStrategy({ app.get('/',(req,res)=>{ //google authentication app.get('/auth/google/secrets', please I need help |
Try replacing : With: passport.deserializeUser(function(user, cb) { |
passport.use(new GoogleStrategy({
clientID: process.env.CLIENT_ID,
clientSecret: process.env.CLIENT_SECRET,
callbackURL: "http://localhost/auth/google/secrets"
userProfileURL: "https://www.googleapis.com/oauth2/v3/userinfo"
},
The text was updated successfully, but these errors were encountered: