Repository navigation
feat(mosaic): sign up with a web3 wallet - #11062
Draft
austincalvelage wants to merge 14 commits into
Draft
austincalvelage wants to merge 14 commits into
austincalvelage wants to merge 14 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: ab86440 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-web3-wallets
branch
from
December 1, 2026 06:37
3a32ba2 to
ccba672
Compare
4 of 9 tasks
austincalvelage
force-pushed
the
austin/mosaic-sign-up-web3-wallets
branch
from
December 2, 2026 05:05
ccba672 to
9d4d1d6
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: |
austincalvelage
force-pushed
the
austin/mosaic-sign-up-web3-wallets
branch
from
December 2, 2026 05:49
9d4d1d6 to
5088d84
Compare
austincalvelage
force-pushed
the
austin/mosaic-sign-up-web3-wallets
branch
from
December 2, 2026 06:29
5088d84 to
a735092
Compare
austincalvelage
force-pushed
the
austin/mosaic-sign-up-web3-wallets
branch
from
December 2, 2026 06:52
a735092 to
8eced67
Compare
austincalvelage
force-pushed
the
austin/mosaic-sign-up-web3-wallets
branch
from
December 2, 2026 07:33
8eced67 to
f13358f
Compare
austincalvelage
force-pushed
the
austin/mosaic-sign-up-web3-wallets
branch
from
December 2, 2026 17:00
f13358f to
9b6cd1a
Compare
austincalvelage
force-pushed
the
austin/mosaic-sign-up-web3-wallets
branch
from
December 2, 2026 17:30
f65ac18 to
7e9693b
Compare
Move the Solana wallet discovery hook from the user profile's web3 section to src/hooks so sign-up can list the same wallets. User profile imports it from there; its behavior and tests are unchanged.
A caller that stays mounted, such as a flow whose wallet picker is one of its routes, enables discovery only while the picker shows, so installed wallets are not asked to register before then. The user profile's picker mounts only while open and enables it always.
Sign-up's wallet tests register wallet-standard wallets and stub Clerk's Coinbase and Base SDK imports the way the user profile's do, so registerWallets and stubEvmModules move next to the other feature test helpers and the testing guide lists them.
The sign-up fake accepts a web3_wallet, prepares a web3 signature with a nonce and message, verifies the signature of that message and drops the password requirement once the wallet is verified, as FAPI does. The sign-in fake answers form_identifier_not_found for an unknown wallet and signs in a known one through the first-factor prepare and attempt.
The start screen shows a button for each web3 first factor between the social providers and the other phone channels. A wallet that already has a user signs that user in; a new one signs up, continues with any fields the instance still needs, and finishes like the form. Rejecting the signature shows the rejected copy, and any failure resets the half-made sign-up so the error shows on the start screen.
The Solana button opens the choose-wallet route, which lists the installed wallet-standard wallets that can sign in with Solana and follows wallets that register while it is open. Discovery starts only when the chooser shows. Picking a wallet runs the same sign-in-first flow with that wallet and the start screen's legal consent; Back returns to the start screen.
…wallet Add the web3 wallet section to the sign-in and sign-up flow doc, and Swingset stories for the start screen's wallet buttons and the chooser while it looks for wallets or finds none.
A button that opens a wallet picker can now wait for the list inside its pending action and open the picker with the list in hand. It shares the eligibility rule with useSolanaWallets, whose signature and behavior are unchanged.
The Solana button now loads the wallet list under the start screen's provider action, so it stays pending and the rest of the screen disabled until the list is ready, and a failure shows on the start screen. The flow then opens the chooser with that list, which it shows until live discovery takes over, so the chooser never opens onto its spinner. Opening the chooser route directly still shows the spinner until the list is ready.
A wallet sign-in that needs a second factor, a Protect check or a session task reuses the OAuth transfer finish and has no wallet test. Pressing Solana again after the wallet library failed to load does not load it again, because the browser keeps a failed module load failed for the page. Browser Back from the chooser belongs to the path routing work.
…activity machine The wallet sign-in now resolves with signed_in, like the OAuth return's, and next sends it to FINALIZE. The result says where it came from, so it still lands on the after sign-up URL and sends a task to the sign-in task route, as legacy's authenticateWithWeb3 does.
Choosing a Solana wallet is now the choosingWallet state, like choosing an enterprise connection. CHOOSE_WALLET keeps the list until Back sends CANCEL_WALLETS, in place of the controller's useState.
austincalvelage
force-pushed
the
austin/mosaic-sign-up-web3-wallets
branch
from
December 2, 2026 17:55
7e9693b to
ab86440
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
Signs up with a Web3 wallet in Mosaic
<SignUp />. Stacked on #11049.On an instance with web3 first factors, the start screen shows a button for each wallet (MetaMask, Coinbase Wallet, OKX Wallet, Base, Solana), after the social buttons and in the instance's order. A wallet that already belongs to a user signs that user in, as the legacy
SignUpdoes. A new wallet signs up and then goes on like the form: continue, the Protect check, or finishing. Solana opens a wallet chooser. A web3-only instance now shows these buttons instead of an empty card. The buttons are hidden during an invitation sign-up and on continue, as in legacy.Shared changes (for Mosaic reviewers)
useSolanaWalletsmoves from user-profile tosrc/hooks/with no behavior change (first commit), then gains a required{ enabled }so sign-up asks wallets to register only once the chooser opens (second commit). That is a new parameter on a shared hook. Austin asked for the move to ship in this PR; both commits sit at the bottom so they can be split out. A third commit addsloadSolanaWallets()beside the hook: it loads the library once and resolves with the eligible wallets, sharing the hook's eligibility rule. The hook's signature and behavior are unchanged. The reuse list inAGENTS.mdand the hook's.doc.tsare updated.src/__tests__/feature/wallets.tsholdsregisterWallets,stubEvmModules,solanaWalletandholdWalletRegistry, shared by the sign-up and user-profile tests.fapi.tsgains a typedfapiSignInbuilder.docs/testing.mdsays so.finishSignIn(resource, { landing })is extracted from the OAuth return's transfer branch, and both paths use it.1. A wallet click tries sign-in first, then signs up. These are the steps
clerk.authenticateWithWeb3takes, run in the model so the flow controller keeps the result. The FuturesignUp.web3()can't do Solana, has nowalletName, and never tries sign-in.2. The result goes through the same flow as the form. A new sign-up returns its step to
next, so continue (which no longer asks for a password once the wallet is verified), Protect, finishing and the in-card organization task work unchanged. An existing wallet's sign-in finishes in place and lands on the after sign-up URL, as legacy does, or goes to the sign-in route for a step it still needs.3. Solana holds its button until the wallet list is ready, then opens the chooser on
choose-wallet. It follows the enterprise connection chooser: the click runs in the provider buttons' pending action, the model'slistWallets()returns the list, and the flow opens the chooser withgo('wallets')and the list in hand, so its spinner never shows. The chooser lists the installed wallet-standard wallets that can sign in with Solana and keeps following wallets that register or unregister. With none installed it links to a wallet list. Back returns to start. Opening/choose-walletdirectly shows the spinner until the list is ready. On an instance without Solana, or during an invitation, the route falls back to start.Deliberate changes from legacy
web3_signature_request_rejected. Legacy shows the wallet's raw message.form_param_nil.getSignUpNextStepmaps the unverified wallet tounknownand the user sees Start over.continue. Legacy drops consent and resolvescontinuerelative tochoose-wallet.Known gaps
it.todoin the web3 test file, including browser Back from the chooser, which belongs to the path routing work.SignInFirstFactorJSONtypes the web3 factor asweb_3_wallet_id, but the wire field isweb3_wallet_id. The fake casts that one field.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code