oauth-everything / passport-discord

A Passport strategy for authenticating with https://discordapp.com/
Mozilla Public License 2.0
20 stars 4 forks source link

Users not registering #8

Open ghostfighter50 opened 3 years ago

ghostfighter50 commented 3 years ago

When I try using this package for registering users thanks to discord's oauth, nothing appears, I try to log the profile variable but nothing appears, I followed the example but it's not working.

  app.use(passport.initialize());
    app.use(passport.session());

    passport.serializeUser((user, done) => {
        done(null, user);
    });
    passport.deserializeUser((obj, done) => {
        done(null, obj);
    });
    passport.use(new Strategy({
      clientID: "clientid",
      clientSecret: "clientsecret",
      callbackURL: "http://localhost:8000/", 
      scope: ["identify", "guilds"],
    }, function (accessToken, refreshToken, profile, done) {
            console.log(profile)
            return done(null, profile);

    }))

I get redirected to http://127.0.0.1:8000/?code=randomcharacters