[PR #6868] [MERGED] fix(sso): enforce domain verification in assignOrganizationByDomain #32535

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6868
Author: @Paola3stefania
Created: 12/18/2025
Status: Merged
Merged: 12/19/2025
Merged by: @Bekacru

Base: canaryHead: fix/sso-domain-verification-check


📝 Commits (4)

  • e2edfd2 fix: verify domain
  • d0d9410 feat: add test
  • c430a4b feat: domain verification check
  • debc2e0 Merge branch 'canary' into fix/sso-domain-verification-check

📊 Changes

3 files changed (+339 additions, -2 deletions)

View changed files

📝 packages/sso/src/index.ts (+1 -0)
packages/sso/src/linking/org-assignment.test.ts (+325 -0)
📝 packages/sso/src/linking/org-assignment.ts (+13 -2)

📄 Description

Summary by cubic

Enables optional domain verification in assignOrganizationByDomain so users are auto-assigned only when the SSO provider’s domain is verified and verification is enabled. Passes domainVerification from sso() options and adds tests for verified/unverified domains, disabled verification, missing org links, existing memberships, and conflicting providers.

  • Bug Fixes
    • SSO provider lookup now requires a domain match and domainVerified: true when domain verification is enabled.

Written for commit debc2e0e9f. Summary will update automatically on new commits.


🔄 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/6868 **Author:** [@Paola3stefania](https://github.com/Paola3stefania) **Created:** 12/18/2025 **Status:** ✅ Merged **Merged:** 12/19/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/sso-domain-verification-check` --- ### 📝 Commits (4) - [`e2edfd2`](https://github.com/better-auth/better-auth/commit/e2edfd21167e075ae3e4c8a809fd204bb52f3e0f) fix: verify domain - [`d0d9410`](https://github.com/better-auth/better-auth/commit/d0d94106ffe140f7e0a3c4c390351500a33b4025) feat: add test - [`c430a4b`](https://github.com/better-auth/better-auth/commit/c430a4bd6adc7581b662005a244907409e619ba6) feat: domain verification check - [`debc2e0`](https://github.com/better-auth/better-auth/commit/debc2e0e9fd65b077ce86e1694a660f820915eb6) Merge branch 'canary' into fix/sso-domain-verification-check ### 📊 Changes **3 files changed** (+339 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/sso/src/index.ts` (+1 -0) ➕ `packages/sso/src/linking/org-assignment.test.ts` (+325 -0) 📝 `packages/sso/src/linking/org-assignment.ts` (+13 -2) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Enables optional domain verification in assignOrganizationByDomain so users are auto-assigned only when the SSO provider’s domain is verified and verification is enabled. Passes domainVerification from sso() options and adds tests for verified/unverified domains, disabled verification, missing org links, existing memberships, and conflicting providers. - **Bug Fixes** - SSO provider lookup now requires a domain match and domainVerified: true when domain verification is enabled. <sup>Written for commit debc2e0e9fd65b077ce86e1694a660f820915eb6. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <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-17 23:19: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#32535