Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing redirect_browser_to action on ContinueWith in typescript client #384

Closed
4 of 5 tasks
JeremyMoeglich opened this issue Nov 7, 2024 · 6 comments
Closed
4 of 5 tasks
Labels
bug Something is not working.

Comments

@JeremyMoeglich
Copy link

Preflight checklist

Ory Network Project

No response

Describe the bug

This is a snippet from the generated Typescript SDK. There should be a redirect_browser_to action, but it's not present.

/**
 * @type ContinueWith
 * @export
 */
export type ContinueWith = {
    action: 'set_ory_session_token';
} & ContinueWithSetOrySessionToken | {
    action: 'show_recovery_ui';
} & ContinueWithRecoveryUi | {
    action: 'show_settings_ui';
} & ContinueWithSettingsUi | {
    action: 'show_verification_ui';
} & ContinueWithVerificationUi;

It is mentioned in the docs https://www.ory.sh/docs/kratos/reference/api#tag/frontend/operation/updateRegistrationFlow
image

The ContinueWithActionRedirectBrowserToString is also nowhere within the sdk.

Reproducing the bug

Install @ory/kratos-client 1.2.1

View it's code in node_modules, see it's missing

Relevant log output

No response

Relevant configuration

No response

Version

Kratos 1.3.0, "@ory/kratos-client": "^1.2.1",

On which operating system are you observing this issue?

Windows

In which environment are you deploying?

Docker

Additional Context

No response

@JeremyMoeglich JeremyMoeglich added the bug Something is not working. label Nov 7, 2024
@ChaserZ98
Copy link

I am also facing this when trying to update a login flow. From my current experience, the DX of using the SDK is awful. The doc is inconsistent and there isn't any well-explained doc about the logic of the SDK. It turns out to me that directly using fetch to call each api is more straightforward except that you have to handle with the type check yourself.

@Juuldamen
Copy link

Juuldamen commented Dec 19, 2024

Same issue here with "@ory/kratos-client-fetch": "^1.2.1" using createBrowserLoginFlowRaw({ returnTo: url }) and updateLoginFlowRaw(...) from the SDK.

react-dom.development.js:9126 Uncaught Error: No variant of ContinueWith exists with 'action=redirect_browser_to'
    at ContinueWithFromJSONTyped (ContinueWith.js:35:19)
    at ContinueWithFromJSON (ContinueWith.js:19:12)
    at Array.map (<anonymous>)
    at SuccessfulNativeLoginFromJSONTyped (SuccessfulNativeLogin.js:32:93)
    at SuccessfulNativeLoginFromJSON (SuccessfulNativeLogin.js:25:12)
    at JSONApiResponse.transformer (FrontendApi.js:900:101)
    at JSONApiResponse.<anonymous> (runtime.js:291:25)
    at Generator.next (<anonymous>)
    at fulfilled (runtime.js:17:58)

@aeneasr
Copy link
Member

aeneasr commented Jan 2, 2025

You will need to use the Kratos SDK of 1.3.0 if you're using Kratos 1.3.0 :)

@aeneasr
Copy link
Member

aeneasr commented Jan 2, 2025

I can see that the SDK definition of 1.3.0 has the missing continue_with included, so I'm going to close this issue.

@aeneasr aeneasr closed this as completed Jan 2, 2025
@JeremyMoeglich
Copy link
Author

JeremyMoeglich commented Jan 2, 2025

There is no 1.3.0, maybe it was never published?

image

@aeneasr
Copy link
Member

aeneasr commented Jan 2, 2025

I see, I'll trigger an v1.3.2 release but maybe the CI fails again. We're planning a new kratos release very soon in any case. As a workaround you can try to use @ory/client which is usually up to date with master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

4 participants