Skip to content

refactor(journey): migrate journey flow from legacy sdk to journey-client#468

Merged
vatsalparikh merged 20 commits into
mainfrom
sdks-4796-journey-client
May 5, 2026
Merged

refactor(journey): migrate journey flow from legacy sdk to journey-client#468
vatsalparikh merged 20 commits into
mainfrom
sdks-4796-journey-client

Conversation

@vatsalparikh
Copy link
Copy Markdown
Contributor

@vatsalparikh vatsalparikh commented Apr 16, 2026

JIRA Ticket

https://pingidentity.atlassian.net/browse/SDKS-4796

Reference:

https://github.com/ForgeRock/ping-javascript-sdk/blob/main/interface_mapping.md

Major files touched

https://github.com/ForgeRock/forgerock-web-login-framework/blob/sdks-4796-journey-client/core/journey-client.config.ts
https://github.com/ForgeRock/forgerock-web-login-framework/blob/sdks-4796-journey-client/core/journey/journey.store.ts
https://github.com/ForgeRock/forgerock-web-login-framework/blob/sdks-4796-journey-client/core/journey/journey.interfaces.ts
https://github.com/ForgeRock/forgerock-web-login-framework/blob/sdks-4796-journey-client/core/journey/_utilities/step.mock.ts
https://github.com/ForgeRock/forgerock-web-login-framework/blob/sdks-4796-journey-client/apps/login-app/src/routes/(app)/%2Blayout.ts
https://github.com/ForgeRock/forgerock-web-login-framework/blob/sdks-4796-journey-client/packages/login-widget/src/lib/_utilities/api.utilities.ts
https://github.com/ForgeRock/forgerock-web-login-framework/blob/sdks-4796-journey-client/packages/login-widget/src/lib/interfaces.ts

Failing login test

One Login test is failing because journey client currently does not create a step for LoginFailure. While JourneyLoginFailure step is defined, that logic is never executed or triggered because on non-2xx errors, journey client simply returns a GenericError without ever checking whether the login failure has happened. I am temporarily passing this test by handling login failure in generic error branch.
Created PR in Ping SDK repo to address this issue: ForgeRock/ping-javascript-sdk#574. To make sure all tests in this PR pass, the PR created in Ping SDK must be merged.

Testing done to ensure migration works

  • All e2e tests, storybook tests, unit tests are passing and the ci workflow is successful
  • Manually tested the redirect flow
  • Manually tested custom component generation and it worked as expected
  • Manually verified the following journeys
    • Registration
    • Login
    • SocialLogin
    • HOTP-Authn
    • UpdatePassword: the user must be logged in for this journey
    • ResetPassword: the user must have only one account with that email
    • ForgottenUsername
    • TEST_WebAuthn-Registration
    • TEST_WebAuthnAuthentication
  • Manually verified the following stages
    • Email Suspend
    • Webauthn
    • Recovery code with HOTP-Authn

How to test

Ensure that you have configured FR_AM_WELLKNOWN_URL=https://openam-sdks.forgeblocks.com/am/oauth2/alpha/.well-known/openid-configuration

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 16, 2026

🦋 Changeset detected

Latest commit: af99389

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@forgerock/login-widget Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vatsalparikh vatsalparikh changed the title feat(journey-client): install and configure journey-client refactor(journey): migrate journey flow from legacy sdk to journey-client Apr 16, 2026
@vatsalparikh vatsalparikh force-pushed the sdks-4796-journey-client branch 6 times, most recently from a8e055f to 05fc510 Compare April 17, 2026 23:21
@vatsalparikh vatsalparikh marked this pull request as ready for review April 18, 2026 02:42
@vatsalparikh vatsalparikh force-pushed the sdks-4796-journey-client branch 3 times, most recently from 64b7e73 to e667e9d Compare April 21, 2026 23:00
Copy link
Copy Markdown
Contributor

@SteinGabriel SteinGabriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review.

Comment thread core/journey/journey.store.ts Outdated
Comment thread core/journey-client.config.ts Outdated
Comment thread apps/login-app/src/routes/e2e/widget/inline/+page.svelte
Comment thread core/journey/_utilities/data-analysis.utilities.ts
@vatsalparikh vatsalparikh force-pushed the sdks-4796-journey-client branch from e667e9d to e932be9 Compare April 23, 2026 20:58
Copy link
Copy Markdown
Contributor

@cerebrl cerebrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one important comment and two minor comments. The redirect patter in the generic.svelte is what I'd like to focus on.

Comment thread core/journey/stages/_utilities/back-to.svelte Outdated
Comment thread core/journey/stages/generic.svelte Outdated
Comment thread core/style.stories.js
Comment thread core/components/compositions/checkbox/animated.svelte
Comment thread core/journey/_utilities/data-analysis.utilities.ts Outdated
Comment thread core/journey/_utilities/data-analysis.utilities.ts
Copy link
Copy Markdown
Contributor

@cerebrl cerebrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still reviewing, but I did catch some imports that are still legacy. Is this a mistake, or do we not have a replacement for it in the new SDK?

Comment thread core/journey/callbacks/_utilities/callback.utilities.ts Outdated
Comment thread core/journey/callbacks/device-profile/device-profile.stories.js Outdated
Comment thread core/journey/stages/stages.story.svelte Outdated
Comment thread packages/login-widget/src/lib/types.ts
Comment thread core/journey/callbacks/device-profile/device-profile.story.svelte Outdated
Comment thread core/journey/callbacks/device-profile/device-profile.svelte Outdated
Comment thread core/journey/callbacks/device-profile/device-profile.stories.js Outdated
Comment thread core/journey/callbacks/device-profile/device-profile.stories.js Outdated
Comment thread core/journey/callbacks/device-profile/device-profile.svelte Outdated
Comment thread core/journey-client.config.ts Outdated
Comment thread packages/login-widget/src/lib/_utilities/api.utilities.ts Outdated
…can handle generic error case as completely generic, login failure is handled by its own branch
@vatsalparikh vatsalparikh force-pushed the sdks-4796-journey-client branch from 080bfd4 to 1226501 Compare May 2, 2026 04:14
@vatsalparikh vatsalparikh requested review from cerebrl and ryanbas21 May 4, 2026 15:07
Copy link
Copy Markdown
Contributor

@cerebrl cerebrl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Comment thread apps/login-app/src/routes/(app)/+page.svelte
@vatsalparikh vatsalparikh requested a review from SteinGabriel May 5, 2026 00:30
@vatsalparikh vatsalparikh merged commit 89ae057 into main May 5, 2026
21 checks passed
@vatsalparikh vatsalparikh deleted the sdks-4796-journey-client branch May 5, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants