Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linkIdentity errors out if the account already exists #1762

Open
2 tasks done
xinha-sh opened this issue Sep 4, 2024 · 1 comment
Open
2 tasks done

linkIdentity errors out if the account already exists #1762

xinha-sh opened this issue Sep 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@xinha-sh
Copy link

xinha-sh commented Sep 4, 2024

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When linking an anonymous account with an existing verified account, it errors out. Instead, it should link the anonymous account.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Sign up an user using any of the OAuth provider. Logout
  2. Sign up an anonymous user
  3. Try to link anonymous user with oAuth provider used in step 1
  4. See error

Expected behavior

Even if the account is already registered, anonymous account should get linked with them.

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

Usecase: An e-commerce platform which lets users add products to cart. The platform is accessible via both web and app. The user has already registered using web, they are new to app. On app they add products and at time of checkout need to sign in. When they try to use their previously registered e-mail id or oauth provider it errors out.

@xinha-sh xinha-sh added the bug Something isn't working label Sep 4, 2024
@oberbeck
Copy link

oberbeck commented Sep 7, 2024

IMO this is not a bug, but a nice new feature request. However, I think it should be optional/configurable as it could mess with existing accounts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants