Preflight checklist
Ory Network Project
No response
Describe the bug
When using the JS/TS SDK client @ory/client, behavior of createBrowserLogoutFlow and createBrowserSettingsFlow are inconsistent.
While calling createBrowserLogoutFlow without any args, the returned type is JSON, from which it is easy to extract logout_url.
When calling createBrowserSettingsFlow without any args, the API response is a 302 to the settings page, which is not handled correctly by the client leading to an exception. One must provide { headers: { accept: "application/json" } } for the code to complete successfully.
Reproducing the bug
const ory: FrontendApi = new FrontendApi(
new Configuration({
basePath: AUTH_ENDPOINT,
credentials: "include",
}),
);
const { logout_url } = await ory.createBrowserLogoutFlow();
const { request_url } = await ory.createBrowserSettingsFlow(); // => exception, invalid JSON
Relevant log output
Relevant configuration
Version
1.20.22
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
No response
Preflight checklist
Ory Network Project
No response
Describe the bug
When using the JS/TS SDK client @ory/client, behavior of
createBrowserLogoutFlowandcreateBrowserSettingsFloware inconsistent.While calling
createBrowserLogoutFlowwithout any args, the returned type is JSON, from which it is easy to extractlogout_url.When calling
createBrowserSettingsFlowwithout any args, the API response is a 302 to the settings page, which is not handled correctly by the client leading to an exception. One must provide{ headers: { accept: "application/json" } }for the code to complete successfully.Reproducing the bug
Relevant log output
Relevant configuration
Version
1.20.22
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
No response