ory / sdk

The place where ORY's SDKs are being auto-generated
Apache License 2.0
141 stars 85 forks source link

Unable to get session_token_exchange_code for native login flow with ory_kratos_client python SDK #296

Open thetheos opened 12 months ago

thetheos commented 12 months ago

Preflight checklist

Ory Network Project

No response

Describe the bug

With the ory_kratos_client python SDK, I am unable to create a native login flow which will return a session_token_exchange_code .

Reproducing the bug

Steps to reproduce:

  1. Creating a native login flow with the return_session_token_exchange_code=True: api_response = api_instance.create_native_login_flow(return_session_token_exchange_code=True)

  2. The response does not include the session_token_exchange_code field and the request_url present in the response is: 'request_url': 'http://self_hosted_ory_kratos/self-service/login/api?return_session_token_exchange_code=True',

  3. From my observations and playing with the API directly, it seems that the issue comes from the uppercase T of True. Calling the api directly with an all lower cases true fixes the issue. 'http://self_hosted_ory_kratos/self-service/login/api?return_session_token_exchange_code=true' I can observe a session_token_exchange_code field in the response.

Relevant log output

No response

Relevant configuration

No response

Version

Ory kratos V1.0.0 and ory-kratos-client 1.0.0

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker Compose

Additional Context

No response