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

Open
#2,238 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go, typescript

Research direction

Start by tracing the existing auth linkIdentity() and signInWithWeb3() entry points and how they handle the current user session. Define how a Solana wallet should be linked to an existing email/password or other-auth user, including the supported API shape and account-linking behavior. Done means the chosen flow is implemented and covered for the stated wallet-linking case.

Written by the indexing model from the issue text.

Description

enhancement
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
Dominant language
Go
Stars
2.6k
Forks
764
Avg merge
5d 3h
Merged PRs (30d)
39

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/auth

All issues in supabase/auth

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.