Cannot enable Authorization Code with PKCE flow on custom OAuth2 connection

Hi!

I found this blog post on how to enable the PKCE flow for a custom OAuth2 connection:

However, when I try to enable it using the following request:

curl -H "Authorization: Bearer XXXXX" -X PATCH  -H "Content-Type: application/json" -d '{"options":{"pkce_enabled":true}}' https://<MY TENANT>.auth0.com/api/v2/connections/<CONNECTION ID>

I receive the following error:

{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Payload validation error: 'Missing required property: scripts' on property options.",
  "errorCode": "invalid_body"
}

Both the pkce_enabled and scripts properties do not seem to be documented so I’m completely in the dark here. Why should I add the scripts property to my PATCH request and what should it contain?

Thanks in advance!

1 Like