[PR #3676] [CLOSED] fix: refactored mappings to be inside of respective configs for types… #4950

Closed
opened 2026-03-13 12:05:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3676
Author: @natetewelde
Created: 7/28/2025
Status: Closed

Base: mainHead: fix/sso-mapping-and-relay-state


📝 Commits (5)

  • ec09bc1 fix: refactored mappings to be inside of respective configs for typesafety, and updated account provisioning to use other fields where nameID may not be set
  • b65c18c chore: lint fixes
  • c5ef4c5 Update packages/sso/src/index.ts
  • e733202 Update docs/content/docs/plugins/sso.mdx
  • 9b6ef93 chore: trigger rebuild after lint fixes

📊 Changes

3 files changed (+202 additions, -119 deletions)

View changed files

📝 docs/content/docs/plugins/sso.mdx (+50 -47)
📝 packages/sso/src/index.ts (+131 -51)
📝 packages/sso/src/oidc.test.ts (+21 -21)

📄 Description

Summary by cubic

Refactored SSO attribute mappings to be defined inside their respective config objects for better type safety and clarity. Improved SAML account provisioning to handle cases where standard fields like nameID may not be present.

  • Refactors
    • Moved OIDC and SAML mapping definitions into their config objects.
    • Updated docs and tests to match the new structure.
    • Enhanced SAML user extraction logic to use alternative fields if nameID is missing.

🔄 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/3676 **Author:** [@natetewelde](https://github.com/natetewelde) **Created:** 7/28/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/sso-mapping-and-relay-state` --- ### 📝 Commits (5) - [`ec09bc1`](https://github.com/better-auth/better-auth/commit/ec09bc1b40066ee2e1d28cdba3d87a5da6a397d8) fix: refactored mappings to be inside of respective configs for typesafety, and updated account provisioning to use other fields where nameID may not be set - [`b65c18c`](https://github.com/better-auth/better-auth/commit/b65c18c1325fb062124e73e99a37db9e2a66445e) chore: lint fixes - [`c5ef4c5`](https://github.com/better-auth/better-auth/commit/c5ef4c5353e930f98660a956797e8fb16585a7a5) Update packages/sso/src/index.ts - [`e733202`](https://github.com/better-auth/better-auth/commit/e7332020b39f824fdf3ee994f16ab82f648ecbf3) Update docs/content/docs/plugins/sso.mdx - [`9b6ef93`](https://github.com/better-auth/better-auth/commit/9b6ef937d0d2d30269c19198619565b1d09e66eb) chore: trigger rebuild after lint fixes ### 📊 Changes **3 files changed** (+202 additions, -119 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/sso.mdx` (+50 -47) 📝 `packages/sso/src/index.ts` (+131 -51) 📝 `packages/sso/src/oidc.test.ts` (+21 -21) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Refactored SSO attribute mappings to be defined inside their respective config objects for better type safety and clarity. Improved SAML account provisioning to handle cases where standard fields like nameID may not be present. - **Refactors** - Moved OIDC and SAML mapping definitions into their config objects. - Updated docs and tests to match the new structure. - Enhanced SAML user extraction logic to use alternative fields if nameID is missing. <!-- 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-03-13 12:05:19 -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#4950