node.js - passport node adding a parameter -


when use passport coinbase node

passport.use(new coinbasestrategy({     clientid: coinbase_client_id,     clientsecret: coinbase_client_secret,     callbackurl: "http://127.0.0.1:3000/auth/coinbase/callback",     scope: [ "send" ] ,    }, 

i error

invalid amount meta[send_limit_amount] ()

what syntax adding parameter? tried 10 different things.

the passport-coinbase library not recognise meta data there callback function in passport pick additional authorisation parameters

i added after passport.use(...) things moving again

// have handle metadata ourselves

const metadata = {      send_limit_amount : 50,      send_limit_currency : 'usd',      send_limit_period : 'day'  }; passport._strategies.coinbase.authorizationparams = function(options) {          var meta = {};     for(o in metadata){         meta['meta['+o+']'] = metadata[o];      };     return meta; }; 

Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -