Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic custom_params #315

Open
maricavor opened this issue Dec 17, 2024 · 1 comment
Open

Dynamic custom_params #315

maricavor opened this issue Dec 17, 2024 · 1 comment

Comments

@maricavor
Copy link

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'}?

@simov
Copy link
Owner

simov commented Dec 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants