supabase-js icon indicating copy to clipboard operation
supabase-js copied to clipboard

Logging in with multiple identities (same email) does not always work

Open shruthigetfreed opened this issue 1 year ago • 2 comments

Bug report

Describe the bug

Our application supports logging in with password and google oauth. Based on supabase documentation, some cases of identity linking are supported, while some are not.

To Reproduce

  1. Create an identity [email protected] and set a password,.
  2. Log in using google oauth as [email protected] This automatically creates 2 identities for the same user associated with [email protected] email.

However, I haven't been able to use supabase to swap steps 1 and 2. i.e

  1. Signup using google oauth as [email protected] successfully.
  2. Try to signup with [email protected] and set a password. This step fails.

Expected behavior

Is this expected behavior? Any hacks/workarounds I can use to support password+social auth for users without following any order?

shruthigetfreed avatar Dec 20 '23 08:12 shruthigetfreed

I have the same issue. How can i resolve it? @shruthigetfreed

tranminhquanq avatar Apr 04 '24 03:04 tranminhquanq

just encountered this myself. used google oauth first, then tried to manually register.

the call works but no session is set and no reference is created in supabase

{
    "id": "10f3b638-c11f-4425-bb22-6de278f3ba1d",
    "aud": "authenticated",
    "role": "",
    "email": "[email protected]",
    "phone": "",
    "confirmation_sent_at": "2024-04-22T12:54:39.589611676Z",
    "app_metadata": {
        "provider": "email",
        "providers": [
            "email"
        ]
    },
    "user_metadata": {},
    "identities": [],
    "created_at": "2024-04-22T12:54:39.589611676Z",
    "updated_at": "2024-04-22T12:54:39.589611676Z",
    "is_anonymous": false
}

mavrick avatar Apr 22 '24 12:04 mavrick