OIDC configuration with code challenge


I try to use authorization code flow with Sync gateway. So I used the following config for in the sync gateway config file:

      "oidc": {
    "providers": {
        "MyAuthFlow": {
			"callback_url": "url"
    "default_provider": "MyAuthFlow"

When I call ’ /{db}/_oidc’ to initiate code flow I got this error: 'Missing parameter, ‘code_challenge’.

So how can we configure my sync gateway to add code challenge parameter?


I am not very familiar with the OIDC topic, but I am thinking you probably need to call GET /{db}/_oidc_challenge?provider= API first to initialize with the preferred provider and get the challenge?