[PR #2074] [MERGED] feat(socialLink): add support for custom scopes in social account linking #12388

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2074
Author: @leoleducq
Created: 4/1/2025
Status: Merged
Merged: 4/11/2025
Merged by: @Bekacru

Base: mainHead: feature/socialLink


📝 Commits (3)

  • 80210b2 feat(socialLink): add support for custom scopes in social account linking
  • d3bc2bd chore: lint
  • 57d30ec fix(account): update account linking logic and tests

📊 Changes

6 files changed (+114 additions, -33 deletions)

View changed files

📝 docs/content/docs/concepts/users-accounts.mdx (+10 -0)
📝 packages/better-auth/src/api/routes/account.test.ts (+27 -3)
📝 packages/better-auth/src/api/routes/account.ts (+11 -0)
📝 packages/better-auth/src/api/routes/callback.ts (+28 -16)
📝 packages/better-auth/src/db/internal-adapter.ts (+2 -2)
📝 packages/better-auth/src/plugins/generic-oauth/index.ts (+36 -12)

📄 Description

  • Updated documentation to include information on requesting specific scopes when linking social accounts.
  • Added a test case to verify that custom scopes are correctly passed to the authorization URL.
  • Modified the account linking endpoint to accept additional scopes as an optional parameter.

🔄 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/2074 **Author:** [@leoleducq](https://github.com/leoleducq) **Created:** 4/1/2025 **Status:** ✅ Merged **Merged:** 4/11/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `feature/socialLink` --- ### 📝 Commits (3) - [`80210b2`](https://github.com/better-auth/better-auth/commit/80210b23c400c9f9a1f27f1bbf206869988f7e16) feat(socialLink): add support for custom scopes in social account linking - [`d3bc2bd`](https://github.com/better-auth/better-auth/commit/d3bc2bd7cc46abe565e7ee7e62923bf80141aea0) chore: lint - [`57d30ec`](https://github.com/better-auth/better-auth/commit/57d30ec2159f4a5efb516e03a85d8196ef5e31b7) fix(account): update account linking logic and tests ### 📊 Changes **6 files changed** (+114 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/concepts/users-accounts.mdx` (+10 -0) 📝 `packages/better-auth/src/api/routes/account.test.ts` (+27 -3) 📝 `packages/better-auth/src/api/routes/account.ts` (+11 -0) 📝 `packages/better-auth/src/api/routes/callback.ts` (+28 -16) 📝 `packages/better-auth/src/db/internal-adapter.ts` (+2 -2) 📝 `packages/better-auth/src/plugins/generic-oauth/index.ts` (+36 -12) </details> ### 📄 Description - Updated documentation to include information on requesting specific scopes when linking social accounts. - Added a test case to verify that custom scopes are correctly passed to the authorization URL. - Modified the account linking endpoint to accept additional scopes as an optional parameter. --- <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:21:23 -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#12388