Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Clerk · Type Alias

Web3Strategy

Web3Strategy is Clerk's string-literal type for selecting a supported wallet-signature verification flow. It covers MetaMask, Base, Coinbase Wallet, OKX Wallet, and Solana.

How it works

Web3Strategy is a string-literal union used to select how Clerk verifies ownership of a user's Web3 wallet. Choose the strategy matching the wallet provider; Solana authentication additionally needs a walletName identifying the provider.

Syntax

type Web3Strategy = "web3_metamask_signature" | "web3_base_signature" | "web3_coinbase_wallet_signature" | "web3_okx_wallet_signature" | "web3_solana_signature"

Key points

  • Web3Strategy identifies the verification method Clerk should use for a wallet-based authentication or sign-up flow.
  • The union includes dedicated signature strategies for MetaMask, Base, and Coinbase Wallet.
  • The remaining supported values target OKX Wallet and Solana wallet-signature authentication.
  • Clerk uses the selected strategy to verify control of the wallet address by checking a cryptographic signature.
  • Web3 authentication can establish identity without passwords or conventional credential-based sign-in.

Common mistakes

  • Solana requires the walletName parameter; omitting it makes the Web3 authentication request invalid.

Example: Declare a Web3 strategy

type Web3Strategy =
  | "web3_metamask_signature"
  | "web3_base_signature"
  | "web3_coinbase_wallet_signature"
  | "web3_okx_wallet_signature"
  | "web3_solana_signature";

This declaration constrains Web3 authentication and verification calls to Clerk's supported wallet-signature strategies.

When to use it

Wallet authentication

Start wallet-based sign-in with a supported Ethereum-compatible provider.

Passwordless Web3 sign-up

Complete a sign-up verification using a wallet-generated cryptographic signature.

Solana wallet verification

Select a Solana wallet provider for a Solana signature flow.

Interview questions

QWhat is Web3Strategy, and which values does it allow?

Web3Strategy is a union of five string literals: MetaMask, Base, Coinbase Wallet, OKX Wallet, and Solana signature strategies. It lets Clerk select the wallet-specific verification flow.

Follow-up: Why should callers avoid arbitrary strings? TypeScript can reject unsupported strategies at compile time, preventing requests that Clerk cannot process.

QHow do you choose a Web3Strategy value?

Use the strategy literal that corresponds to the wallet being verified, such as web3_metamask_signature or web3_coinbase_wallet_signature. The type represents a Web3 verification strategy rather than a generic OAuth strategy.

Follow-up: What additional input is needed for Solana? Pass walletName as well as web3_solana_signature, because Clerk requires the provider name for that flow.

QWhere is Web3Strategy used?

Web3Strategy is used by Clerk's Web3 sign-in and sign-up verification APIs. Those flows verify wallet ownership through a cryptographic signature instead of traditional credentials.

Follow-up: How does a Solana flow differ operationally? It still uses a wallet signature, but Clerk also needs the selected Solana wallet provider identified by walletName.

  • SignIn
  • SignUp
  • SignInFirstFactor
  • Web3SignatureFactor

Source: Clerk class - Objects - JavaScript. Checked 2026-10-15.