I am using passport-twitter to add a twitter connect to my website.
User can connect via different actions and I'd like to redirect them to different pages depending on where they clicked.
So far I am using the same callback url every login:
passport.use(new TwitterStrategy({
consumerKey: TWITTER_CONSUMER_KEY,
consumerSecret: TWITTER_CONSUMER_SECRET,
callbackURL: "http://127.0.0.1:3000/auth/twitter/callback"
},
function(token, tokenSecret, profile, done) {
// some code
}
));
Here I'd like to add a parameter passed to my twitter strategy to define which callbackURL to use:
app.get('/auth/twitter/:option',
passport.authenticate('twitter'));
How can I do this?
Many thanks