Repository navigation
Add session-less support - #68
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved URL query-handling issues can break session-less launches and discard override parameters.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds session-less widget support by passing sessionToken through iframe URLs instead of init messages.
Changes:
- Updates widget initialization, types, examples, and tests.
- Adds session-less coverage for KYC, payment, and Travel Rule widgets.
- Updates test-app URL override handling.
File summaries
| File | Summary |
|---|---|
projects/widget-test-app/src/shared/api/requests/create-payment-session.ts |
Moderate findings (1 vote each): KYC/Travel Rule overrides can lose sessionToken, and payment overrides can discard supplied query parameters instead of merging them. |
packages/travel-rule-widget-web-sdk/src/travel-rule-widget.test.ts |
Adds session-less Travel Rule coverage. |
packages/payment-widget-web-sdk/src/payment-widget.test.ts |
Adds session-less payment coverage. |
packages/kyc-widget-web-sdk/src/types/kyc-widget.ts |
Simplifies KYC session typing. |
packages/kyc-widget-web-sdk/src/kyc-widget.ts |
Updates session-related examples. |
packages/kyc-widget-web-sdk/src/kyc-widget.test.ts |
Adds session-less KYC coverage. |
packages/core/src/widget.ts |
Sends only options during initialization. Moderate finding (2 votes): related KYC/Travel Rule URL overrides can drop sessionToken query parameters. |
packages/core/src/widget.test.ts |
Tests session-less initialization and token URLs. |
Review details
Suppressed comments (2)
projects/widget-test-app/src/shared/api/requests/create-payment-session.ts:54
- Session-less KYC and Travel Rule launches still lose their token in the test app:
create-kyc-session.tsandcreate-travel-rule-session.tsstill replace the API URL directly, unlike this query-preserving replacement. Since the API now delivers the session through?sessionToken=..., the documentedurlOverridepaths will load the local widgets without a token and fail; apply the same URL handling to both helpers.
newUrl.search = oldUrl.search;
projects/widget-test-app/src/shared/api/requests/create-payment-session.ts:54
- This replaces the entire override query string with the API URL's query, so any parameters intentionally supplied in
paymentSessionUrlOverrideare silently lost. For example, an override such ashttp://localhost:8788/?debug=truewill no longer includedebug=true; merge the API query parameters into the override instead of assigningsearchwholesale.
newUrl.search = oldUrl.search;
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
boliveira
reviewed
Sep 11, 2026
elpinho
force-pushed
the
feature/add-sessionless-support
branch
3 times, most recently
from
September 25, 2026 13:55
6141fae to
0f6c423
Compare
boliveira
force-pushed
the
feature/add-sessionless-support
branch
2 times, most recently
from
September 30, 2026 14:28
65dd2ca to
db76bcd
Compare
boliveira
previously approved these changes
Oct 1, 2026
boliveira
force-pushed
the
feature/add-sessionless-support
branch
from
October 1, 2026 10:42
db76bcd to
7bf7c9b
Compare
andreffvalente
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds session-less support to the widgets.
Related issues
Deploy notes
Merge and deploy https://github.com/uphold/enterprise-api/pull/1190 and https://github.com/uphold/enterprise-widget/pull/335 first