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

Ory Console: Errors in editing/ saving existing OAuth2 clients created using Ory REST API #393

Open
4 of 5 tasks
anichrelay-bloom opened this issue Sep 9, 2024 · 1 comment
Labels
bug Something is not working.

Comments

@anichrelay-bloom
Copy link

anichrelay-bloom commented Sep 9, 2024

Preflight checklist

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:

  1. Audience field and input box turn red, no error message is shown:
    image

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.

  1. 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:

  1. 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",
}
  1. Go to ory console -> OAuth2 -> Oauth2 clients -> click on Edit button on newly created client test client3.
  2. Click on Save. Should throw audience error.
  3. 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

@anichrelay-bloom anichrelay-bloom added the bug Something is not working. label Sep 9, 2024
@jonas-jonas
Copy link
Member

Thanks for the report. We'll take a look.

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

No branches or pull requests

2 participants