[PR #7477] [MERGED] test(sso): add email normalization tests for SAML and OIDC #32941

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7477
Author: @Paola3stefania
Created: 1/20/2026
Status: Merged
Merged: 1/20/2026
Merged by: @himself65

Base: canaryHead: fix/saml-email-normalization-test


📝 Commits (1)

  • 66c3ae7 test(sso): improve email normalization test coverage for SAML and OIDC

📊 Changes

2 files changed (+153 additions, -97 deletions)

View changed files

📝 packages/sso/src/oidc.test.ts (+84 -27)
📝 packages/sso/src/saml.test.ts (+69 -70)

📄 Description

Summary by cubic

Add tests for SAML and OIDC that verify emails are lowercased and prevent duplicate users when casing differs. Uses a mock IdP, updates SAML mappings, parses cookies to verify sessions, and restores server listeners; aligns with Linear #7052.

Written for commit 66c3ae7089. Summary will update 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/7477 **Author:** [@Paola3stefania](https://github.com/Paola3stefania) **Created:** 1/20/2026 **Status:** ✅ Merged **Merged:** 1/20/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/saml-email-normalization-test` --- ### 📝 Commits (1) - [`66c3ae7`](https://github.com/better-auth/better-auth/commit/66c3ae7089f6b9884704631c25a887c2b6cf2f48) test(sso): improve email normalization test coverage for SAML and OIDC ### 📊 Changes **2 files changed** (+153 additions, -97 deletions) <details> <summary>View changed files</summary> 📝 `packages/sso/src/oidc.test.ts` (+84 -27) 📝 `packages/sso/src/saml.test.ts` (+69 -70) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Add tests for SAML and OIDC that verify emails are lowercased and prevent duplicate users when casing differs. Uses a mock IdP, updates SAML mappings, parses cookies to verify sessions, and restores server listeners; aligns with Linear #7052. <sup>Written for commit 66c3ae7089f6b9884704631c25a887c2b6cf2f48. Summary will update 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:38: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#32941