Skip to content

Google Auth popup not working (Solution) #29

@aishikanandi

Description

@aishikanandi
  1. Change app.get('/auth/google") :

app.get("/auth/google",
passport.authenticate('google',{ scope: ["profile"] }),
function(req, res) {
// Successful authentication, redirect to secrets.
res.redirect("/auth/google/secrets");
});

  1. Use :
    passport.serializeUser((user, done) => done(null, user));
    passport.deserializeUser((user, done) => done(null, user));

Instead of:
passport.serializeUser(User.serializeUser());
passport.deserializeUser(User.deserializeUser());

  1. Also, remove:
    userProfileURL :"https://www.googleapis.com/oauth2/v3/userinfo" from GoogleStrategy. It is no longer needed.
    Google Auth popup must work now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions