refactor(oidc-and-protect): refactor login framework to use the new oidc and protect clients from Ping Orch SDKs - #552
Conversation
🦋 Changeset detectedLatest commit: 2d6c90a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
133fa33 to
8da22b6
Compare
cerebrl
left a comment
There was a problem hiding this comment.
I'd like to stick with the pattern of using Svelte Stores for managing state and it's dependencies. Svelte refers to these as "custom stores" or "derived stores". You can see examples of them in this repo. Here's one that's fairly simple: https://github.com/ForgeRock/forgerock-web-login-framework/blob/main/packages/login-widget/src/lib/_utilities/component.utilities.ts.
ae9d8b4 to
6f5e1a3
Compare
3ad1b32 to
06d5227
Compare
Really appreciate your feedback here. Took me several iterations to fully understand and implement a declarative, derived, observer based svelte store. Thank you so much for taking the time to review it deeply and providing all the suggestions. It was a challenging and very rewarding experience! I have created an oidc store for oidc client initialization. widget.api file composes it and passes it to both oauth and user stores. They consume the client. The code is ready for another review now. I believe some minor tweaks can be made but the code is structurally sound now in the sense that I've avoided promises, race conditions, and other issues with the help of declarative, observable pattern based code! The PR is ready for review again, @cerebrl ! |
60a7fe6 to
5d1904c
Compare
…idc and protect clients from Ping Orch SDKs
Yes, there are some e2e protect tests here: https://github.com/ForgeRock/forgerock-web-login-framework/blob/SDKS-5216/core/protect/protect.store.test.ts |
SteinGabriel
left a comment
There was a problem hiding this comment.
Everything on my end has been addressed and the changes look good. There are only a few files with stale copyright dates, but other than that everything looks great.
Stale copyright dates:
core/journey/callbacks/ping-protect-initialize/ping-protect-initialize.sveltee2e/tests/widget/modal/widget-modal.login.test.jspackages/login-widget/scripts/copyTypes.mjs
done, thanks! |
JIRA Ticket
https://pingidentity.atlassian.net/browse/SDKS-5216
Technical decisions
Tests performed
Sample app login widget
Login Framework
How to test
Pull https://github.com/ForgeRock/sdk-sample-apps/tree/migrate-login-widget-2.0 branch locally and test journey, oidc, and protect flows.
Here is the PR that accommodates all the updates necessary in the sample app ForgeRock/sdk-sample-apps#123
Recordings
The recordings below show how both journey client terminate and oidc user logout are necessary in user.logout function in login widget. They both perform two different operations. The recordings also show how tokens are correctly stored in cookie and local storage respectively, verifying that login, tokens, logout all work as expected.