[PR #1238] [MERGED] feat: allow manually linking account with different email address than user #20609

Closed
opened 2026-04-15 19:48:55 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1238
Author: @D3visionNL
Created: 1/18/2025
Status: Merged
Merged: 1/19/2025
Merged by: @Bekacru

Base: mainHead: feat/manual-account-link-email-check-setting


📝 Commits (5)

  • 4c3c36a Added setting to disable email check for manual account linking. Also added setting to documentation.
  • 5977bfc Merge branch 'better-auth:main' into feat/manual-account-link-email-check-setting
  • f503b26 Updated setting to 'allowDifferentEmails' which is false by default
  • a28d047 Merge branch 'feat/manual-account-link-email-check-setting' of https://github.com/D3visionNL/better-auth into feat/manual-account-link-email-check-setting
  • 92cd863 Implemented requested changes

📊 Changes

3 files changed (+20 additions, -1 deletions)

View changed files

📝 docs/content/docs/concepts/users-accounts.mdx (+11 -0)
📝 packages/better-auth/src/api/routes/callback.ts (+1 -1)
📝 packages/better-auth/src/types/options.ts (+8 -0)

📄 Description

closes #918

This PR includes both the fix, a settings option to disable the email check, as well as an edit to the users-accounts documentation to document this new settings option.

This is my first time ever creating a PR so please feel free to let me know if I need to improve or change something.

Last but not least, I was unable to create a test for this as I could not find any tests which test for config options. However I built it and tested it on one of my personal projects which uses Better Auth and it worked exactly as intended.


🔄 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/1238 **Author:** [@D3visionNL](https://github.com/D3visionNL) **Created:** 1/18/2025 **Status:** ✅ Merged **Merged:** 1/19/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `feat/manual-account-link-email-check-setting` --- ### 📝 Commits (5) - [`4c3c36a`](https://github.com/better-auth/better-auth/commit/4c3c36a6211e9ccb33f513f19f443e525a2bac59) Added setting to disable email check for manual account linking. Also added setting to documentation. - [`5977bfc`](https://github.com/better-auth/better-auth/commit/5977bfc9a9b35caa6beff3dbb36ad2d0e676db06) Merge branch 'better-auth:main' into feat/manual-account-link-email-check-setting - [`f503b26`](https://github.com/better-auth/better-auth/commit/f503b26406b5701defa085df208515b0f9a4ddd3) Updated setting to 'allowDifferentEmails' which is false by default - [`a28d047`](https://github.com/better-auth/better-auth/commit/a28d047678f169717d25cc950abe283633883156) Merge branch 'feat/manual-account-link-email-check-setting' of https://github.com/D3visionNL/better-auth into feat/manual-account-link-email-check-setting - [`92cd863`](https://github.com/better-auth/better-auth/commit/92cd8637d81ffb0a00e763da06d98cdc5f7a5ca9) Implemented requested changes ### 📊 Changes **3 files changed** (+20 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/concepts/users-accounts.mdx` (+11 -0) 📝 `packages/better-auth/src/api/routes/callback.ts` (+1 -1) 📝 `packages/better-auth/src/types/options.ts` (+8 -0) </details> ### 📄 Description closes #918 This PR includes both the fix, a settings option to disable the email check, as well as an edit to the users-accounts documentation to document this new settings option. This is my first time ever creating a PR so please feel free to let me know if I need to improve or change something. Last but not least, I was unable to create a test for this as I could not find any tests which test for config options. However I built it and tested it on one of my personal projects which uses Better Auth and it worked exactly as intended. --- <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-15 19:48:55 -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#20609