Implement and debug wallet connection and authentication in this repo using thirdweb v5 and the SIWE-style flow in `app/hooks/useWalletAuth.ts` and `app/hooks/server_actions.ts`. Use for ConnectButton setup, account state, signature/auth verification, Base/USDC config, and CSP issues with embedded wallet.
Installation
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Implement and debug wallet connection and authentication in this repo using thirdweb v5 and the SIWE-style flow in `app/hooks/useWalletAuth.ts` and `app/hooks/server_actions.ts`. Use for ConnectButton setup, account state, signature/auth verification, Base/USDC config, and CSP issues with embedded wallet.
account.signMessage({ message }) (sign the message string)
verifySignedPayload({ payload, signature })
On failure, disconnect wallet and clear attempt ref
Mini App notes (Coinbase Wallet / Base)
Use ConnectButton or ConnectEmbed for wallet UI. ConnectEmbed is the same UI as the modal, but inline, which is useful for an embedded sign-in screen in a Mini App.
Configure wallets explicitly via the wallets prop; include inAppWallet() and any target wallets (ex: createWallet("com.coinbase.wallet")).
The Connect UI supports 500+ wallets and in-app wallets, so keep a short, curated list for Mini App UX.
The Connect UI can optionally include Auth (SIWE-style), which can be wired to your existing server endpoints.
Inference: WebViews typically don’t have browser extensions, so don’t rely on auto-detected EIP-6963 extensions; prefer explicit wallet configuration.
What to load next
For the repo’s exact auth sequence and edge cases: read references/auth-flow.md.