Setting password via updateUser does not add `email` provider to user identities
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- go, javascript
- Domain
- authentication, backend
Research direction
Trace the updateUser({ password }) flow and the getUserIdentities and linkIdentity({ provider: 'email' }) entry points, then inspect how auth.identities is updated for OAuth users. Reproduce the Google sign-up and password-setting sequence, and verify that a subsequent identity lookup includes an email provider without breaking email/password login.
Written by the indexing model from the issue text.
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs and GitHub Discussions.
Describe the bug
When a user signs up with an OAuth provider (e.g. Google) and later sets a password via
await supabase.auth.updateUser({ password: 'password' })
they can successfully log in with email/password, but the "email" provider is not added to the auth.identities table.
To Reproduce
-
Sign up with Google (OAuth) using Supabase Auth.
-
Call:
await supabase.auth.updateUser({ password: 'password' }) -
Inspect linked identities:
const { data: identities } = await supabase.auth.getUserIdentities(); -
Observe:
- Email/password login works
- No
"email"entry appears in the list of linked identities
Expected behavior
After updateUser({ password }), the "email" provider should be automatically linked and visible in the auth.identities table, just as when using linkIdentity() for OAuth providers.
System information
- OS: macOS
- Browser: Chrome
- Version of supabase-js: 2.50.3
- Version of Node.js: 22.8.6
Additional context
When calling updateUser({ password }), either the auth.identities table should be updated with the "email" provider, or linkIdentity({ provider: 'email' }) should be supported for the email provider.
This issue highlights a gap in Supabase Auth’s identity-linking lifecycle. Manual linking exists for OAuth-to-OAuth, but there is no supported mechanism to link the email provider after setting a password. Common workarounds include manual SQL inserts into auth.identities or tracking password capability in a custom table. A built-in fix or supported API for linking an email identity would resolve this inconsistency.
- 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