Skip to content

Sign-in modal: register via Auth0 native signup, not Cloud's wizard - #423

Draft
jvorcak wants to merge 2 commits into
feature/ask-ai-agent-sdkfrom
fix/native-auth0-signup-link
Draft

Sign-in modal: register via Auth0 native signup, not Cloud's wizard#423
jvorcak wants to merge 2 commits into
feature/ask-ai-agent-sdkfrom
fix/native-auth0-signup-link

Conversation

@jvorcak

@jvorcak jvorcak commented Aug 25, 2026

Copy link
Copy Markdown

Summary

The header sign-in modal's "Create a free account" link is hardcoded to cloud.redpanda.com/sign-up — Cloud's full onboarding wizard, which provisions a trial org + resources even for a docs-only sign-in.

This mirrors the "Continue" button's existing pattern (modalCta.href = '/login?disclosed=1&return_to=...') for the signup case: point at docs-site's /login?disclosed=1&signup=1&return_to=..., which resolves (as of docs-site#212) to Auth0's native screen_hint=signup screen on the docs Auth0 client, instead of Cloud's wizard.

Depends on

docs-site#212 must land first (or at least the signup=1 fast path in docs-login.mjs) for /login?signup=1 to resolve correctly — until then this link 404s/falls through to the plain interstitial.

Why draft

Base is feature/ask-ai-agent-sdk (PR #395), not main — this only makes sense once that lands. Also: the underlying assumption (Auth0 native signup doesn't trigger Cloud's trial-resource provisioning) is still being verified on the docs-site preview; flagging here in case that turns out false and this needs to be reverted/rethought.

Test plan

  • docs-site#212 (or its signup=1 support) is merged into this feature branch's target environment
  • On a preview build, click "Create a free account" from the header sign-in modal
  • Confirm it lands on Auth0's native "Sign up" screen (not cloud.redpanda.com)
  • Confirm return_to still round-trips correctly after signup completes

"Create a free account" hardcoded a link to cloud.redpanda.com/sign-up,
Cloud's full onboarding wizard, which provisions a trial org +
resources even for a docs-only sign-in. Point it at docs-login's
/login?signup=1 fast path instead, mirroring how the Continue button
already routes through /login?disclosed=1 — docs-site resolves that to
Auth0's native screen_hint=signup screen on its Auth0 client.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

Revert 7ceaed0's core change. Auth0's native screen_hint=signup skips
org provisioning entirely: the docs Auth0 client requires organization
membership, and org creation only happens inside Cloud's own onboarding
wizard (cloud-ui/cloud-api), which an Auth0-native signup never touches.
So every account created through /login?signup=1 ends up permanently
org-less -- login_error=org_setup_incomplete forever, since verifying
the emailed address does not create an organization.

Team decision was to keep routing "Create a free account" through
Cloud's real wizard (so accounts actually work) and instead skip the
wasted welcome-cluster provisioning for docs-tagged signups on the
Cloud side -- see cloudv2's signUpSource/backoffice-worker work, which
solves the original waste concern without breaking login.

Also, while touching this file:
- returnTo() now includes window.location.hash. It previously dropped
  the URL fragment, so signing in from a page with a #section-anchor
  silently lost the reader's position; docs-site's safeReturnTo()
  already accepts it as-is.
- Corrected the org_setup_incomplete/access_denied toast copy to match
  the same fix just made in docs-site docs-login.mjs: pointed at
  finishing Cloud account setup, not at "click the verification link,"
  which cannot fix a missing organization and was sending users into a
  permanent retry loop.
@JakeSCahill

Copy link
Copy Markdown
Contributor

Pushed a follow-up commit as part of a cross-repo review of this PR alongside docs-site #181/#212 and cloudv2 #29334 (findings verified against live code):

Reverted this PR's core change (screen_hint=signup fast path for "Create a free account"). Confirmed by direct reproduction: any Auth0-native signup on the docs Auth0 client (which requires org membership) produces a permanently org-less account — login_error=org_setup_incomplete forever, since verifying the emailed address does not create an organization (only Cloud's real onboarding wizard does). #212 on docs-site (the dependency this PR names) never verified its own core assumption and should be treated the same way.

The underlying waste concern (Cloud's wizard provisioning a trial cluster nobody asked for) has a real fix that doesn't break login: cloudv2's signUpSource/backoffice-worker work (currently #29334) tags docs-referred signups and skips just the welcome-cluster provisioning, while still creating a real org through the normal pipeline. "Create a free account" now goes back to cloud.redpanda.com/sign-up with the existing UTM tagging, which is exactly the signal that mechanism reads.

Two more contained fixes while in this file:

  • returnTo() was dropping window.location.hash — a reader on a #section-anchor who signed in landed back at the top of the page instead of where they were. Now included; docs-site's safeReturnTo() already accepts it as-is.
  • The org_setup_incomplete/access_denied toast copy ("click the verification link, then sign in again") can't actually fix a missing-org account — corrected to match the same fix just pushed to docs-site's docs-login.mjs (point at finishing Cloud setup, not the inbox). Currently unreachable dead code under the current docsLoginError redirect design (server-side interstitial handles all login errors now), but kept in sync per this file's own comment in case that changes.

No test harness exists for this file (node --check syntax-verified; no lint/test script wired to it in this repo).

Not fixed here, flagged only: Auth0's own hosted Universal Login page still renders its native "Sign up" link independent of anything in docs-ui — reachable via "Continue" → Auth0's hosted login → its own signup link — which produces the same permanently org-less account. That's Auth0 tenant/connection config, out of reach from this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants