-
Notifications
You must be signed in to change notification settings - Fork 411
feat(clerk-js): Add ability for users to connect a Solana enabled wallet via <UserProfile />
#7341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Kenton Duprey <kenton@clerk.dev>
Core Changes - Add `AuthenticateWithSolanaParams` type for Solana-specific authentication - Extend `authenticateWithWeb3` to support Solana wallets with `walletName` parameter - Add `authenticateWithSolana` method to `SignInResource` for dedicated Solana auth - Require `walletName` for Solana provider to enable multi-wallet selection - Split Ethereum and Solana provider detection into separate modules Updated types - Add `web3_solana_signature` to `Web3Strategy` union type - Add `walletName` field to `Web3SignatureFactor` type - Update `AuthenticateWithWeb3Params` to include optional `walletName` - Removed unused Wallet Standard types in `web3.ts` (moved to library imports) Dependencies - Add `@solana/wallet-standard@^1.1.4` for Solana wallet types - Add `@wallet-standard/core@^1.1.1` for wallet registry - Add `@wallet-standard/react@^1.0.1` for React integration Signed-off-by: Kenton Duprey <kenton@clerk.dev>
… selectable wallet support - Adds `web3_solana_signature` strategy for Sign In and Sign Up, introduces a Solana wallet selection route (`choose-wallet`), and integrates Solana wallet-standard APIs for identifier and signature generation. - Add `@solana/wallet-standard`, `@solana/wallet-adapter-react`, `@solana/wallet-adapter-base`, `bs58` libs - Implement `injectedWeb3SolanaProviders.ts` singleton with feature/type guards within `solana:signMessage`, connect flow - Update `web3.ts` to fetch Solana identifier via `StandardConnect` and sign messages via `SolanaSignMessage`. - Add `authenticateWithSolana` to `SignIn`, `SignUp`, and expose through `IsomorphicClerk` & `Clerk` interface. - Extend `SignInResource`, `SignUpResource`, introduce `SignUpAuthenticateWithSolanaParams`, thread optional `walletName`. - Support `web3_solana_signature` in sign-in and sign-up start machines. - Add `SignInFactorOneSolanaWalletsCard` component and `choose-wallet` route; extend `FlowMetadata` with `choose-wallet`. - Add `getSolanaIdentifier`, `generateSignatureWithSolana`, propagate `walletName` into web3 auth flow - if named wallet not found, attempt `window.solana` before failing gracefully. Signed-off-by: Kenton Duprey <kenton@clerk.dev>
…ents Signed-off-by: Kenton Duprey <kenton@clerk.dev>
Signed-off-by: Kenton Duprey <kenton@clerk.dev>
… methods Signed-off-by: Kenton Duprey <kenton@clerk.dev>
…l error handling and strict types Signed-off-by: Kenton Duprey <kenton@clerk.dev>
… logic Signed-off-by: Kenton Duprey <kenton@clerk.dev>
Signed-off-by: Kenton Duprey <kenton@clerk.dev>
… authentication methods Signed-off-by: Kenton Duprey <kenton@clerk.dev>
…nal walletname Signed-off-by: Kenton Duprey <kenton@clerk.dev>
… package.json and pnpm-lock.yaml Signed-off-by: Kenton Duprey <kenton@clerk.dev>
…ck.yaml Signed-off-by: Kenton Duprey <kenton@clerk.dev>
…andling Signed-off-by: Kenton Duprey <kenton@clerk.dev>
…y to <UserProfile /> Signed-off-by: Kenton Duprey <kenton@clerk.dev>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Description
This adds support for C2 users to manage their Solana Web3 wallet connection via the
<UserProfile />component, ensuring that this new feature has a full E2E usage support. This will render the available wallet provider connections via a second action step, as seen with adding a passkey flow via the<UserProfie />.USER-3772
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change