so i am trying to set up twitter oauth, either v1 or v2, to my web app. google oauthv2 is working just fine but when i try passport-twitter-oauth2 it says that there isn't any access toekn, and when i try basic oauthv1.1 auth it sends this error message "APIError: You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you’ll need to apply for Elevated access via the Developer Portal." even though i am not even accessing any endpoint at all i just need it to log my users in. for reference here is my passport.js file:
passport.use(new TwitterStrategy({
consumerKey: TWITTER_KEY,
consumerSecret: TWITTER_SECRET,
callbackURL: "http://localhost:8080/api/user/auth/twitter/callback",
passReqToCallback: true
},
(accessToken, refreshToken, profile, done) => {
console.log(profile);
return done(err, profile)
// User.findOrCreate({ twitterId: profile.id }, function (err, user) {
// return cb(err, user);
// });
}
));
user.get('/auth/twitter',passport.authenticate('twitter'));
user.get('/auth/twitter/callback',passport.authenticate('twitter', { failureRedirect: '/auth/error' }), (req, res) => {
res.redirect('/');
});