fix(auth): use provider-specific lookup in link-social callbak#8917
Closed
SandipGyawali wants to merge 3 commits into
Closed
fix(auth): use provider-specific lookup in link-social callbak#8917SandipGyawali wants to merge 3 commits into
SandipGyawali wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
@SandipGyawali is attempting to deploy a commit to the better-auth Team on Vercel. A member of the Team first needs to authorize it. |
@better-auth/api-key
better-auth
auth
@better-auth/core
@better-auth/drizzle-adapter
@better-auth/electron
@better-auth/expo
@better-auth/i18n
@better-auth/kysely-adapter
@better-auth/memory-adapter
@better-auth/mongo-adapter
@better-auth/oauth-provider
@better-auth/passkey
@better-auth/prisma-adapter
@better-auth/redis-storage
@better-auth/scim
@better-auth/sso
@better-auth/stripe
@better-auth/telemetry
@better-auth/test-utils
commit: |
bytaesu
requested changes
Apr 3, 2026
Member
bytaesu
left a comment
There was a problem hiding this comment.
Could you add regression test code?
- replaced findAccount() with findAccountByProviderId() in Oauth - prevents two providers return the same external accountiD
Contributor
|
Solved in #8983 |
Contributor
|
This issue has been locked as it was closed more than 7 days ago. If you're experiencing a similar problem or you have additional context, please open a new issue and reference this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #8906
Summary by cubic
Switch the OAuth link-social callback in
better-authto use provider-scoped account lookup to prevent ID collisions across providers. ReplacefindAccount(...)withfindAccountByProviderId(id, provider.id)to ensure the correct user is linked; addresses #8906.Written for commit fbcfc9c. Summary will update on new commits.