-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Every time I call my passport.authenticate("twitter",...) for the same user, Twitter shows me the standard App wants to access your Twitter account. page. I do see my app in the Connected apps setting with the scopes I requested but still, the authorization page is shown every time.
The authorization page is shown one time only when I use passport-google-oauth20 or passport-facebook. With every subsequent passport.authenticate(...) call it just calls the redirect/callback without showing anything to the user. I would expect the same behaviour for Twitter. Is it possible to achieve this behaviour?
Version: 1.2.2
My configuration:
import { Strategy as TwitterStrategy } from "@superfaceai/passport-twitter-oauth2";
....
passport.use(new TwitterStrategy({
clientID: TWITTER_CLIENT_ID,
clientSecret: TWITTER_CLIENT_SECRET,
callbackURL: "/auth/twitter/redirect",
clientType: "confidential"
}, async (accessToken, refreshToken, profile, done) => {
console.log("> twitter profile: ", profile);
///.....
}));router.get("/twitter", passport.authenticate("twitter", { scope: ['tweet.read', 'users.read'] }));
router.get("/twitter/redirect", passport.authenticate("twitter"), (req, res) => {
res.status(200).json({ success: true });
});Btw, thanks for the amazing library!
DobromirKirovLime
Metadata
Metadata
Assignees
Labels
No labels