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 5 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

Hi @wrux ! Thanks for the feature/enhancement request. I transferred it to this repo, since this is not supported on the auth server yet. So it would need first to be implemented on the auth server, and then on the js sdk!

mandarini avatar Nov 03 '25 13:11 mandarini