Closed SavvasMohito closed 1 year ago
That’s very strange, thank you for the report!
Hi @aeneasr, as you can see I have now created PR #223 with the necessary change to fix this issue. I have tested it locally with my project and I can confirm it works as expected. 🙂
Fixed in https://github.com/ory/hydra/pull/3337. Hopefully the clients will function properly once re-generated.
Preflight checklist
Describe the bug
Hello there.
Today I updated my ory_hydra_client python library and ory/hydra backend to version 2.0.1. After that, when trying to get a token using the OAuth2Api.oauth2_token_exchange(grant_type="client_credentials"), I am getting an error saying
"Invalid type for variable 'scope'. Required value type is int and passed type was str at ['received_data']['scope']"
.I looked into it and the issue seems to be here https://github.com/ory/sdk/blob/847fa4451dd67b624a2820402e92ec6385128921/clients/hydra/python/ory_hydra_client/model/o_auth2_token_exchange.py#L89 where the client expects to receive an integer for the scope field from the hydra server but instead it receives a string (as it should).
Performing the same flow with the same credentials through an HTTP call (using postman) works fine. The previous version of the library worked also fine for o_auth2_token() function. This looks like a typo to me.
I can provide my code but I don't think this is an issue caused by my config.
Reproducing the bug
Steps to reproduce:
Relevant log output
Relevant configuration
Version
2.0.1
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker Compose
Additional Context
No response