grant
grant copied to clipboard
Dynamic custom_params
trafficstars
The dynamic configuration allows certain configuration keys to be set dynamically over HTTP GET/POST request. What about custom_params, how to set then dynamically custom_params: {ui_locales: 'en'}?
The same way as with any other parameter:
var qs = require('qs')
qs.stringify({scope: ['asdf'], custom_params: {ui_locales: 'en'}})
// or a similar method in the browser
// note that some querystring libraries cannot encode nested objects properly
and then your provider configuration needs something like this:
{
"your-provider": {
"dynamic": ["scope", "custom_params"]
}
}
Let me know if that helps.