Issue with automatic identity linking
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start with the identity-linking FAQ and reproduce the OAuth-then-password recovery/update flow described in the issue, comparing auth.users.raw_app_meta_data and auth.identities with the inverse signup flow. Trace the authentication identity-linking implementation in this Go repository; done means the email provider appears in both records and the dashboard's providers list matches the inverse flow.
Written by the indexing model from the issue text.
Description
Bug report
- [ x] I confirm this is a bug with Supabase, not with my own application.
- [ x] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
Email provider metadata is not updated and identities table not updated when adding email provider to an existing OAuth account. This behaviour is described in the FAQ of the identity linking documentation.
To Reproduce
- Create an OAuth user ( tested with Google / Apple )
- Perform a password recovery / update on the email matching the OAuth user
The behaviour is described in the FAQ of the documentation
It is possible to login now with email / password in addition to the OAuth provider. However the implementation seems to be partial.
The raw_app_meta_data column in the auth.users table is not updated with the additional email provider and also there is no additional entry in the auth.identities table for the e-mail provider. As a result the providers column in the Authentication screen is only showing the Apple / Google logo although there is also an email provider configured now for this user.
The raw_app_meta_data column still looks like this although email provider was added:
{"provider": "google", "providers": ["google"]}
Expected behavior
The expected automatic linking behavior should be the same when you do the inverse signup flow:
- First create a user using the email provider ( normal email / password user )
- For that user, also do an Oauth signup ( Google / Apple ).
In this case, the raw_app_meta_data column in the auth.users table is updated with the OAuth provider and also an additional row is created in the auth.identities table for the adiditional OAuth provider. Also the providers column in the Authentication screen is correctly showing 2 providers ( email + Google / Apple ).
The raw_app_meta_data is updated when Oauth provider (e.g. Google ) was added in addition to email.
{"provider": "google", "providers": ["google", "email"]}
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Tested with both Kotlin and Swift Auth libraries
Additional context
Add any other context about the problem here.
- Dominant language
- Go
- Stars
- 2.6k
- Forks
- 764
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 39
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/auth
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100