Repository navigation
feat(mosaic): enable URL routing for sign-up - #11128
Draft
austincalvelage wants to merge 9 commits into
Draft
austincalvelage wants to merge 9 commits into
austincalvelage wants to merge 9 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: b7a880c The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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 |
3 of 9 tasks
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
…p routed in the URL
…k and verify routes Sign-up now builds its OAuth/SAML callback URL and its email link's redirect URL the way @clerk/ui's SignUp context does: the sso-callback or verify route plus ui's redirect query string. Path routing returns to <path>/sso-callback and <path>/verify, virtual routing to signUpUrl#/sso-callback and signUpUrl#/verify, and hash and query routing to the same routes on the current page in Mosaic's own format. Arriving on either route runs the return, which replaces the __clerk_mosaic_sign_up marker.
…ash and query routing
austincalvelage
force-pushed
the
austin/mosaic-sign-up-url-routing
branch
from
December 4, 2026 23:31
60129ec to
b7a880c
Compare
This branch was successfully deployed
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
Lets Mosaic
SignUplive in the URL, and sends its OAuth and email-link returns to the same routes@clerk/ui'sSignUpuses. Based on main. The next PR in the stack makes path and hash routing read the hash URLs legacy builds.Shared changes (for Mosaic reviewers)
live/authentication/sign-up/[[...page]]/page.tsxand gets a?mode=switcher for virtual, path, hash and query routing.auth-flow.utilscase that expects{ type: 'done' }is renamed to say it hides the flow.1.
routingandpathput sign-up's screens in the URL.SignUptakes the routing props every Mosaic component takes and renders under its own routing scope, so a reload, Back and Forward land on the screen in the URL, and a route the sign-up doesn't allow is replaced by the one it does. Virtual stays the default.2. OAuth and email-link returns land on
sso-callbackandverify, as inui. The__clerk_mosaic_sign_upmarker is gone. Sign-up's route table gains legacy's two return routes, and opening sign-up on one of them runs the return behind the loading screen.The URLs match
ui'sbuildRedirectUrl(ui/src/common/redirects.ts), with the redirect query built byRedirectUrls(...).toSearchParams()asui'sauthQueryStringis:/sign-up/sso-callback?redirect_url=…/sign-up/verify?redirect_url=…<signUpUrl>#/sso-callback?redirect_url=…<signUpUrl>#/verify?redirect_url=…/app?redirect_url=…#.sign-up=sso-callback/app?redirect_url=…#.sign-up=verify/app?redirect_url=…&.sign-up=sso-callback/app?redirect_url=…&.sign-up=verifyIn virtual mode the return goes to the sign-up URL, as in
ui, so a sign-up that started in a modal or an embedded component finishes on the sign-up page. That page completes it when it routes by path or hash (next PR) or is Account Portal.3. A sign-up that is already complete or transferable finishes when sign-up opens. With no session override, the arrival intent is
finish: the loading screen shows from the first paint,completerunsfinalize(), andtransfertransfers the account as the OAuth return does. This covers opening sign-up offsso-callbackafter the return began.Known gaps
#.sign-up=sso-callback), notui's#/sso-callback, and keep the redirect params in the page query.__clerk_*params, whichuikeeps, so a stale ticket or link status does not come back./verifyas inui, so Back in the same mount does not run the return again.SignUphas nossoCallbackUrl,emailLinkRedirectUrl,forceRedirectUrl,fallbackRedirectUrlorsignInUrlprops yet, and no/createprefix for a combined flow.The changeset is empty because
SignUpis not exported yet.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code