-
Notifications
You must be signed in to change notification settings - Fork 460
fix(ui): keep standalone sign-up protect-check mounted #9082
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
Open
mwickett
wants to merge
27
commits into
main
Choose a base branch
from
mw/protect-check-standalone-signup-route
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
0f726f7
feat(clerk-js,shared,ui): Add Protect SDK challenge support during si…
zourzouvillys f641da5
Merge branch 'main' into theo/protect-check-sdk-support
jacekradko f013b20
Merge branch 'main' into theo/protect-check-sdk-support
jacekradko ccab663
Merge remote-tracking branch 'origin/main' into theo/protect-check-sd…
zourzouvillys ead7059
fix(ui): wire protect-check route into combined sign-in flow; reword …
zourzouvillys e61ce4e
fix(react): mirror protectCheck/submitProtectCheck on sign-in/up stat…
zourzouvillys 7e14a2e
Merge branch 'main' into theo/protect-check-sdk-support
jacekradko d3e2c2b
Merge remote-tracking branch 'origin/main' into theo/protect-check-sd…
zourzouvillys 0f1b746
fix(ui): harden protect-check cards via shared runner hook
zourzouvillys 305b7a4
fix(ui): route every sign-in/up protect gate through one choke point
zourzouvillys 66da198
fix(clerk-js): scope redirect-callback protect gate to the flow intent
zourzouvillys 2a9bb5b
docs(shared): document protect_check expires_at as Unix epoch millise…
zourzouvillys a8c7dff
Merge remote-tracking branch 'origin/theo/protect-check-sdk-support' …
zourzouvillys dba89a2
Merge remote-tracking branch 'origin/main' into theo/protect-check-sd…
zourzouvillys 3a36fc8
fix(clerk-js): route gated web3 sign-up to the protect-check; address…
zourzouvillys b745323
chore(ui): raise signup bundlewatch budget to 12KB
zourzouvillys 03b90bb
test(ui): cover the sign-in protect-gate choke point and a call site
zourzouvillys 15eea0e
test(ui): use a consistent email fixture for the protect-gate routing…
zourzouvillys c2795e4
docs(shared): clarify protect-check gating in changeset and typedoc
zourzouvillys dcefd05
Merge branch 'main' into theo/protect-check-sdk-support
zourzouvillys 3963323
chore(js): raise clerk.legacy.browser bundlewatch budget to 116KB
zourzouvillys bb425b3
fix(shared): keep protect-check sdk_url out of the load-failure error
jacekradko 48d4a00
fix(clerk-js,ui,shared): route protect-check gates through per-mount …
zourzouvillys 1bfc927
fix(ui): don't blank the protect-check card when the check resolves
zourzouvillys 3d499af
chore(ui): bump ui.browser.js bundlewatch limit to 44KB
zourzouvillys 36fd93c
fix(ui): keep standalone sign-up protect-check mounted
mwickett bf21a73
fix(ui): handle stale standalone sign-up protect-check route
mwickett File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@clerk/ui': patch | ||
| --- | ||
|
|
||
| Fix standalone `<SignUp />` Protect checks so the verification card stays mounted while a solved challenge routes to the next step, while stale direct visits to the protect-check route return to the start of the sign-up flow. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| '@clerk/clerk-js': minor | ||
| '@clerk/localizations': minor | ||
| '@clerk/react': minor | ||
| '@clerk/shared': minor | ||
| '@clerk/ui': minor | ||
| --- | ||
|
|
||
| Add support for Clerk Protect mid-flow SDK challenges (`protect_check`) on both sign-up and sign-in. | ||
|
|
||
| When the Protect antifraud service issues a challenge, responses now carry a `protectCheck` field | ||
| with `{ status, token, sdkUrl, expiresAt?, uiHints? }`. Clients resolve the gate by loading the | ||
| SDK at `sdkUrl`, executing the challenge, and submitting the resulting proof token via | ||
| `signUp.submitProtectCheck({ proofToken })` or `signIn.submitProtectCheck({ proofToken })`. The | ||
| response may carry a chained challenge, which the SDK resolves iteratively. | ||
|
|
||
| Sign-in adds a new `'needs_protect_check'` value to the `SignInStatus` union. **Upgrading this | ||
| package is type-only and does not change runtime behavior**: the server returns the new status | ||
| (and the `protectCheck` field) only for instances where Protect mid-flow challenges have been | ||
| explicitly enabled — the feature is off by default and is not enabled for existing instances by | ||
| upgrading. The server additionally only emits the new status value to SDK versions that | ||
| understand it, so older clients never receive an unknown status. | ||
|
|
||
| If an exhaustive `switch` on `signIn.status` flags the new value after upgrading, handle it by | ||
| running the challenge described by `protectCheck` and submitting the proof via | ||
| `submitProtectCheck()`. Clients should treat the `protectCheck` field as the authoritative gate | ||
| signal and fall back to the status value for defense in depth. | ||
|
|
||
| The pre-built `<SignIn />` and `<SignUp />` components handle the gate automatically by routing | ||
| to a new `protect-check` route that runs the challenge SDK and resumes the flow on completion. |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes user-facing runtime behavior in
packages/ui, but the added changeset is empty. The repo instructions only allow an empty changeset for changes with no user-facing impact; without a package entry,@clerk/uidoes not get the patch release/changelog entry needed for consumers to receive this protect-check fix through the normal non-major release flow. Please add a patch changeset for@clerk/uidescribing the user-visible fix.Useful? React with 👍 / 👎.