Repository navigation
feat(mosaic): redeem invitations in sign-up - #10944
Draft
austincalvelage wants to merge 20 commits into
Draft
austincalvelage wants to merge 20 commits into
austincalvelage wants to merge 20 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 91de416 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 |
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
|
austincalvelage
force-pushed
the
austin/mosaic-sign-up-invitations
branch
from
November 20, 2026 22:22
c977252 to
c0fd345
Compare
@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: |
1 of 9 tasks
austincalvelage
force-pushed
the
austin/mosaic-sign-up-invitations
branch
from
November 21, 2026 01:15
8f5cd12 to
a36f82f
Compare
austincalvelage
force-pushed
the
austin/mosaic-sign-up-invitations
branch
from
November 21, 2026 04:02
a36f82f to
d487ad9
Compare
austincalvelage
force-pushed
the
austin/mosaic-sign-up-invitations
branch
from
November 23, 2026 17:09
d487ad9 to
bd8e06a
Compare
austincalvelage
force-pushed
the
austin/mosaic-sign-up-invitations
branch
from
November 23, 2026 17:19
2c3f167 to
ec7bc61
Compare
austincalvelage
force-pushed
the
austin/mosaic-sign-up-invitations
branch
from
November 24, 2026 05:49
00ac838 to
ca1819c
Compare
austincalvelage
force-pushed
the
austin/mosaic-sign-up-invitations
branch
from
November 24, 2026 16:13
ca1819c to
f1f1b44
Compare
austincalvelage
force-pushed
the
austin/mosaic-sign-up-invitations
branch
from
November 24, 2026 16:20
f1f1b44 to
a8a0b02
Compare
Sign-up redeems a ticket from __clerk_ticket or __clerk_invitation_token once, showing the loading screen, then goes to the step the sign-up needs, usually continue for the password. A rejected ticket shows its error on the start form, which then works as a normal sign-up. While the invitation's sign-up is in progress, the start form locks the invited email and updates that sign-up instead of creating a new one.
…ith FAPI's real codes
…icted mode A sign-up is the invitation's when FAPI verified its email with the ticket strategy, so an earlier sign-up on the client no longer blocks redemption or poses as the invitation. With a ticket in the URL, start shows the form in restricted and waitlist mode. Submitting the start form clears a rejected invitation's error, and Start over removes the ticket parameters.
…t is in the URL An abandoned invitation sign-up stayed on the client, so a later visit to the plain sign-up page locked the start form to the invited email and updated the old sign-up. Sign-up now also needs the ticket in the URL, as legacy `SignUpStart` does with `hasExistingSignUpWithTicket`.
The invitation checks pushed `useSignUpModel` past the cognitive complexity limit. The channels an invitation hides are picked once at the top.
Folds the rejected and expired invitation tests into one table.
…tion is blocked Fails today. The blocked notice now comes from the result a request resolves with, and redeeming an invitation still rejects with the error, so the start form shows it inline.
…ion is blocked `redeemTicket` resolves with the blocked result when FAPI answers `action_blocked`, as `create` and the Protect proof do, and the controller keeps it for the mount. Any other error still rejects and shows on the start form.
…finishes signing up An invitation that leaves nothing to fill in completes on redemption. The first test holds the session activation and fails today: the start form shows, locked and busy, between the loading screen and the navigation. It also pins that the invitation is redeemed once on this path. The second test passes today. It pins what a failed activation shows: the error on the start form, with the way to sign in.
…inishes signing up An invitation that leaves nothing to fill in completes on redemption. The loading screen showed only while the ticket action was pending, and that action ends as soon as it hands the step to the finish machine. The finish froze the model, which says start, so the start form showed, locked and busy, until the session was active. The ticket action now hands next the loading screen, and the finish freezes it with the model. A failed activation ends the hold, so start shows the error.
The invitation tests move out of the shared sign-up feature test with the helpers they alone use, and are grouped by what the invitee is doing in place of one "SignUp invitations" block.
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
Redeems invitations in Mosaic sign-up. Stacked on #10930.
When someone opens an invitation link, sign-up redeems the ticket, shows the loading screen while it does, and goes to the step the sign-up still needs. That is usually the continue screen for a password, since the invitation already verified the email.
Review fixes
SignUpStartchecks withhasExistingSignUpWithTicket. An abandoned invitation sign-up no longer locks a later plain visit to the invited email.fix(mosaic): treat a sign-up as the invitation's only while its ticket is in the URL, covered by "starts a new sign-up when a later visit has no ticket in the URL".test(mosaic): show an expired invitation on the sign-up start form, covered by "shows an $kind invitation on the start form, then signs up normally", which runs for a rejected and an expired ticket.passwordupdate type and its changeset moved down to feat(shared): accept channel on create and password on update in SignUpFuture params #10955, so this PR no longer changes@clerk/shared.useSignUpModelis back under the cognitive complexity limit.refactor(mosaic): keep the sign-up model under the complexity limit, a refactor with no new test.1. The model reads the ticket and redeems it. The ticket comes from
__clerk_ticketor__clerk_invitation_token, as legacy reads it.redeemTicketreturns the next step, or the blocked notice when FAPI blocks the request, and the invited email for the form.2. Sign-up redeems once, on
start. A sign-up is the invitation's when the ticket is in the URL and FAPI verified its email with theticketstrategy. So a reload doesn't redeem again, a sign-up the user had already started doesn't block the invitation, and an old invitation sign-up doesn't take over a later visit without a ticket. A ref keyed by the ticket keeps StrictMode from redeeming it twice, and the screen isloadingwhile it runs. A rejected ticket shows its error on the start form until the user submits it.3. Going back to
startnever drops the invitation. While the invitation's sign-up is in progress,startlocks the invited email and updates that sign-up instead of creating a new one. WhatsApp is hidden, as in legacy. With a ticket in the URL,startshows the form in restricted and waitlist mode, because FAPI lets a ticket through.4. The invitation's sign-up finishes on the continue screen. It sends the password with the update, as #10881 already does for any sign-up. An invitation that FAPI completes on redemption keeps the loading screen up until sign-up leaves.
Finishing or starting over removes the ticket parameters from the URL. The fake FAPI redeems seeded tickets the way clerk_go does: the invited email starts verified, a ticket bypasses the sign-up mode gate, and an unknown or expired ticket returns
ticket_invalid_codeorticket_expired_code.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code