auth icon indicating copy to clipboard operation
auth copied to clipboard

Allow linking Web3 wallets (e.g. Solana) to existing Supabase auth users

Open wrux opened this issue 2 months ago • 1 comments

Description

Currently, supabase.auth.linkIdentity() only supports linking OAuth providers (Google, GitHub, etc.) to an existing Supabase Auth user. However, there’s no supported way to link a Web3 wallet to a user account that was created with email/password or other auth methods.

It's currently possible to sign up with wallet and add email and oauth providers.

Suggested solution

Add support for something like:

await supabase.auth.linkWeb3Wallet({
  chain: 'solana',
  statement: 'Link your Solana wallet to your account',
  wallet: wallet.adapter,
})

or extend the existing sign-in method to detect if a user session exists:

await supabase.auth.signInWithWeb3({
  provider: 'solana',
  statement: 'Link your Solana wallet to your account',
  wallet: wallet.adapter,
  linkToCurrentUser: true,
})

Alternative

No response

Additional context

No response

Validations

wrux avatar Nov 02 '25 13:11 wrux