-
-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Labels
bugSomething is not working.Something is not working.
Description
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
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 JSONRelevant 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething is not working.Something is not working.