javascript - How to dinamically configure Passportjs strategies? -


i playing around passport, , configuring twitter login way:

passport.use(new twitterstrategy({     consumerkey: '*****',     consumersecret: '*****',     callbackurl: "http://blabla/callback"   },   function(token, tokensecret, profile, done) {     done(null, profile)   } )); 

i want able configure values: (consumerkey, consumersecret, callbackurl) on runtime, based on logged user. advice?

you need use your consumer key , consumer secret, not ones of users. application able authenticate your users using twitter. keys , secrets used authenticate app twitter api.

see example project:


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -