Description
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
https://wizardly-ganguly-cuxppwjvrz.projects.oryapis.com
Describe the bug
I created OAuth2 clients using the Ory REST APIs successfully but I am facing issues when trying to edit the clients using Ory console. Even if I don't make any changes to an client and hit on Save
, I see these two errors:
I imagine this is because I am using a non-url string as audience that might be causing some validation errors internally. However, I am able to successfully set the audience as dev-api
when using rest api /admin/clients
.
So, the audience value should also work with Ory console.
- If I remove audience field, the second error pops up at bottom of client edit page:
Unable to decode the request body: json: cannot unmarshal array into Go struct field Client.token_endpoint_auth_signing_alg of type string
I have set the value using rest api endpoints as : "token_endpoint_auth_signing_alg": "RS256",
Again, I don't see any of these errors while using REST endpoints.
Reproducing the bug
Few ways to reproduce but lets do this:
- Create a OAuth2 client using POST
/admin/clients
endpoint with this body:
{
"client_name": "test client3",
"grant_types": [
"client_credentials"
],
"response_types": [
"token"
],
"access_token_strategy": "jwt",
"skip_consent": true,
"audience": [
"dev-api"
],
"scope": "read:all",
"token_endpoint_auth_method": "client_secret_post",
"token_endpoint_auth_signing_alg": "RS256",
"jwt_bearer_grant_access_token_lifespan": "720h",
"client_credentials_grant_access_token_lifespan": "720h",
}
- Go to ory console -> OAuth2 -> Oauth2 clients -> click on Edit button on newly created client
test client3
. - Click on Save. Should throw audience error.
- Clear audience field and click on save. Now you should see the second error.
Relevant log output
No response
Relevant configuration
No response
Version
latest I suppose
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
No response