[PR #2460] [MERGED] fix(generic-oauth): on link account make sure to match provider Id before updating existing account #12579

Closed
opened 2026-04-13 08:28:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2460
Author: @Bekacru
Created: 4/27/2025
Status: Merged
Merged: 4/27/2025
Merged by: @Bekacru

Base: mainHead: fix/oauth2-conflict


📝 Commits (3)

  • 8c13949 remove init from generic oauth
  • 44d84da remove init from stripe
  • 7c2d373 fix: make sure to fetch existing account with providerId

📊 Changes

2 files changed (+21 additions, -2 deletions)

View changed files

📝 packages/better-auth/src/db/internal-adapter.ts (+16 -0)
📝 packages/better-auth/src/plugins/generic-oauth/index.ts (+5 -2)

📄 Description

No description provided


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/2460 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 4/27/2025 **Status:** ✅ Merged **Merged:** 4/27/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `fix/oauth2-conflict` --- ### 📝 Commits (3) - [`8c13949`](https://github.com/better-auth/better-auth/commit/8c139490bed7bbbfbe422b1966cafac1c7e57391) remove init from generic oauth - [`44d84da`](https://github.com/better-auth/better-auth/commit/44d84da7dd24524e2a9bde185390ebdbb341f781) remove init from stripe - [`7c2d373`](https://github.com/better-auth/better-auth/commit/7c2d373ef87c0552da1464fb23a3d463c34a8322) fix: make sure to fetch existing account with providerId ### 📊 Changes **2 files changed** (+21 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/db/internal-adapter.ts` (+16 -0) 📝 `packages/better-auth/src/plugins/generic-oauth/index.ts` (+5 -2) </details> ### 📄 Description _No description provided_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 08:28:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#12579