You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using kratos-client-rust in WASM, the ACCEPT header is set to */* for all requests, resulting in 303 redirect requests on browser flow endpoints.
It is unclear if this is as a result of a lack of functionality in openapi-generator or if the custom Ory templates do not include the necessary lines as the header is set in other SDKs.
This could also be by design, however there is no way to set the ACCEPT header meaning the browsers tested will automatically follow the 303 response in the AJAX request, and other SDKs such as Go do explicitly set this to application/json.
Reproducing the bug
Setup self hosted kratos
call ory_kratos_client::apis::frontend_api::create_browser_login_flow from a rust project, specifically WASM
Observe a XHR request with Accept: */*
Receive a 303 response redirecting to the login UI as if directly accessed from the browser instead of the expected 200 with JSON response.
Relevant log output
No response
Relevant configuration
No response
Version
1.0.0
On which operating system are you observing this issue?
Other
In which environment are you deploying?
Other
Additional Context
Running in a Yew v0.21.0 Rust WASM app bundled with Trunk v0.17.5.
Tested against Kratos 1.0.0 in Chrome 118.0.5993.117 and Safari 17.0 on macOS, however the line parameters are missing from the generated rust sources meaning it could be undefined behavior.
The text was updated successfully, but these errors were encountered:
Preflight checklist
Ory Network Project
No response
Describe the bug
When using kratos-client-rust in WASM, the ACCEPT header is set to
*/*
for all requests, resulting in 303 redirect requests on browser flow endpoints.It is unclear if this is as a result of a lack of functionality in openapi-generator or if the custom Ory templates do not include the necessary lines as the header is set in other SDKs.
This could also be by design, however there is no way to set the ACCEPT header meaning the browsers tested will automatically follow the 303 response in the AJAX request, and other SDKs such as Go do explicitly set this to
application/json
.Reproducing the bug
ory_kratos_client::apis::frontend_api::create_browser_login_flow
from a rust project, specifically WASMAccept: */*
Relevant log output
No response
Relevant configuration
No response
Version
1.0.0
On which operating system are you observing this issue?
Other
In which environment are you deploying?
Other
Additional Context
Running in a Yew v0.21.0 Rust WASM app bundled with Trunk v0.17.5.
Tested against Kratos 1.0.0 in Chrome 118.0.5993.117 and Safari 17.0 on macOS, however the line parameters are missing from the generated rust sources meaning it could be undefined behavior.
The text was updated successfully, but these errors were encountered: