[PR #6047] [MERGED] chore(sso): add support for custom field mapping #6405

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6047
Author: @jonathansamines
Created: 11/17/2025
Status: Merged
Merged: 11/17/2025
Merged by: @Bekacru

Base: canaryHead: feat/sso-custom-field-mapping


📝 Commits (1)

  • fe2c99b chore(sso): add support for custom field mapping

📊 Changes

4 files changed (+215 additions, -0 deletions)

View changed files

📝 docs/content/docs/plugins/sso.mdx (+42 -0)
📝 packages/sso/src/index.ts (+8 -0)
📝 packages/sso/src/saml.test.ts (+142 -0)
📝 packages/sso/src/types.ts (+23 -0)

📄 Description

Closes #5649

Summary by cubic

Adds support for custom field mapping for SSO providers so teams can use existing table and column names without changing their schema. Defaults remain unchanged for backward compatibility.

  • New Features
    • Added modelName and fields overrides in SSOOptions for issuer, oidcConfig, samlConfig, userId, providerId, organizationId, and domain.
    • Updated types and docs to document the new options.
    • Added SAML tests covering custom field mapping.

Written for commit fe2c99b4f4. 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/6047 **Author:** [@jonathansamines](https://github.com/jonathansamines) **Created:** 11/17/2025 **Status:** ✅ Merged **Merged:** 11/17/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `feat/sso-custom-field-mapping` --- ### 📝 Commits (1) - [`fe2c99b`](https://github.com/better-auth/better-auth/commit/fe2c99b4f4896258e93e8b3270c62a613e2b20be) chore(sso): add support for custom field mapping ### 📊 Changes **4 files changed** (+215 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/sso.mdx` (+42 -0) 📝 `packages/sso/src/index.ts` (+8 -0) 📝 `packages/sso/src/saml.test.ts` (+142 -0) 📝 `packages/sso/src/types.ts` (+23 -0) </details> ### 📄 Description Closes #5649 <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Adds support for custom field mapping for SSO providers so teams can use existing table and column names without changing their schema. Defaults remain unchanged for backward compatibility. - **New Features** - Added modelName and fields overrides in SSOOptions for issuer, oidcConfig, samlConfig, userId, providerId, organizationId, and domain. - Updated types and docs to document the new options. - Added SAML tests covering custom field mapping. <sup>Written for commit fe2c99b4f4896258e93e8b3270c62a613e2b20be. 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-03-13 12:57:45 -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#6405