Skip to content

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

@wrux

Description

@wrux

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions