Skip to content

Signup: protect passwordless signup with Blackbox - #113300

Open
Usiel wants to merge 4 commits into
trunkfrom
usielriedl/blackbox-signup
Open

Signup: protect passwordless signup with Blackbox#113300
Usiel wants to merge 4 commits into
trunkfrom
usielriedl/blackbox-signup

Conversation

@Usiel

@Usiel Usiel commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Load the Blackbox client in PasswordlessSignupForm behind a new blackbox-signup feature flag: render the challenge container, block submit while the SDK initializes, and attach blackbox_session_id to the /users/new request.

The standalone path (no flow name, parent-owned submit — Jetpack Connect signup and logged-out invite accept) hands the session ID off through the submitForm payload. handlePasswordlessSubmit now forwards an afterSubmit callback so those parents can report the request outcome; on failure the form resets Blackbox so a retry gets a fresh, verifiable session.

Depends on server-side changes 232387-ghe-Automattic/wpcom. Also, note the protection is disabled for production.json right now via the feature flag.

@Usiel
Usiel force-pushed the usielriedl/blackbox-signup branch from 95f42ad to 1e2bc5a Compare August 6, 2026 05:01
@Usiel
Usiel requested a review from bateszi August 6, 2026 05:02
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 6, 2026
@Usiel
Usiel marked this pull request as ready for review August 6, 2026 05:02
@Usiel

Usiel commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Tests will fail due to dependency on backend changes.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Looks like one of the E2E tests has failed.

You can fix them following these steps:

  1. Check out this branch locally:
    gh pr checkout 113300
  2. Start Claude Code in the repo:
    claude
  3. Run the /fix-e2e-tests skill, passing this PR number:
    /fix-e2e-tests 113300
    

Usiel added 4 commits August 7, 2026 11:14
Load the Blackbox client in `PasswordlessSignupForm` behind a new
`blackbox-signup` feature flag: render the challenge container, block
submit while the SDK initializes, and attach `blackbox_session_id` to
the `/users/new` request.

The standalone path (no flow name, parent-owned submit — Jetpack
Connect signup and logged-out invite accept) hands the session ID off
through the `submitForm` payload. `handlePasswordlessSubmit` now
forwards an `afterSubmit` callback so those parents can report the
request outcome; on failure the form resets Blackbox so a retry gets a
fresh, verifiable session.
The button below already has sufficient padding, we just need to get a gap to the username input.
Both screens of the social-first signup stay mounted and are hidden via
CSS visibility stacking, so the challenge widget (which sets its own
visibility inside a closed shadow root) bled through onto the selection
screen and consumed a session before email was even picked.

Add a `suspended` flag to `useBlackboxProtection` (exposed as a
`blackboxSuspended` prop by `withBlackboxProtection`) and gate each
stacked `PasswordlessSignupForm` on its screen being active. `useBlackbox`
now sets loading when enabled after mount and clears blocking state when
suspended mid-challenge.
Cover the /start/account, Jetpack Connect, and invite-accept signup
surfaces against the three Blackbox verdicts (allow, challenge, block).

These specs fail until 232387-ghe-Automattic/wpcom is merged: the
server-side signup changes on the `/users/new` endpoint live in that PR,
so until it ships the signup itself fails.
@Usiel
Usiel force-pushed the usielriedl/blackbox-signup branch from 1e2bc5a to 6f31970 Compare August 7, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants