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

loginRequest.requested_access_token_audience is setting to null instead of [] #3655

Closed
5 tasks done
JoMC98 opened this issue Oct 26, 2023 · 2 comments · Fixed by #3711
Closed
5 tasks done

loginRequest.requested_access_token_audience is setting to null instead of [] #3655

JoMC98 opened this issue Oct 26, 2023 · 2 comments · Fixed by #3711
Labels
bug Something is not working.

Comments

@JoMC98
Copy link

JoMC98 commented Oct 26, 2023

Preflight checklist

Ory Network Project

No response

Describe the bug

Hi,

We are using Hydra v2.2.0rc3 that is on Pre-Release and in our login service, we are using Python client library ory-hydra-client==2.2.0rc3.

When we try to obtain the login request with the library function:
hydra_login_request = hydra.get_o_auth2_login_request(login_challenge=login_challenge), we receive the following error:

ory_hydra_client.exceptions.ApiTypeError: Invalid type for variable 'requested_access_token_audience'. Required value type is StringSliceJSONFormat and passed type was NoneType at ['received_data']['requested_access_token_audience']

The problem is that this api call: http://<HYDRA_HOST>:4445/admin/oauth2/auth/requests/login?challenge=<LOGIN_CHALLENGE> is returning "requested_access_token_audience": null as can be seen here:
image

The python client library expect an Array instead of null, throws an error and the login flow breaks.

I think this can be a bug on the pre-release hydra version and should be fixed before releasing the stable version.

I have read the following issue that is similar: #2039, but we are not using in-memory database, we are using MySQL database.

Thanks in advance

Reproducing the bug

  1. Start hydra with v2.2.0rc3
  2. GET http://<HYDRA_HOST>:4445/admin/oauth2/auth/requests/login?challenge=<CHALLENGE>
  3. You can see that requested_access_token_audience is null instead of empty list

Relevant log output

No response

Relevant configuration

No response

Version

v2.2.0rc3

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response

@JoMC98 JoMC98 added the bug Something is not working. label Oct 26, 2023
@JoMC98 JoMC98 changed the title loginRequest.requested_access_token_audience is setting to null instead of [] loginRequest.requested_access_token_audience is setting to null instead of [] Oct 26, 2023
@JoMC98 JoMC98 changed the title loginRequest.requested_access_token_audience is setting to null instead of [] loginRequest.requested_access_token_audience is setting to null instead of [] Oct 26, 2023
@haslersn
Copy link

haslersn commented Feb 4, 2024

It seems v2.2 got released on docker hub (and v2 now points to v2.2) without this issue being fixed. So most clients are now broken. (At least hydra-client-rust has the same problem. The API violation seems to be on the hydra server side.)

@haslersn
Copy link

haslersn commented Feb 5, 2024

@aeneasr this issue should have been a release blocker. Are there any plans on fixing this and creating a new release with the fix?

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

Successfully merging a pull request may close this issue.

2 participants