[PR #6118] [MERGED] sso(fix): generate metadata on saml sign on #32060

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6118
Author: @albertpurnama
Created: 11/20/2025
Status: Merged
Merged: 11/20/2025
Merged by: @Bekacru

Base: canaryHead: fix/sso-signin-empty-metadata


📝 Commits (5)

📊 Changes

1 file changed (+28 additions, -1 deletions)

View changed files

📝 packages/sso/src/routes/sso.ts (+28 -1)

📄 Description

Summary by cubic

Auto-generate a minimal SAML Service Provider config when SP metadata is missing, preventing SSO sign-in failures. ACS endpoint now accepts form-encoded and JSON payloads.

  • Bug Fixes
    • Auto-build SP metadata when missing: entityID (spMetadata.entityID or issuer), HTTP-POST ACS at callbackUrl or default /sso/saml2/sp/acs/{providerId}, with wantMessageSigned and nameIDFormat support.
    • Add allowedMediaTypes to ACS endpoint: application/x-www-form-urlencoded and application/json.

Written for commit 4c1ba4ea01. 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/6118 **Author:** [@albertpurnama](https://github.com/albertpurnama) **Created:** 11/20/2025 **Status:** ✅ Merged **Merged:** 11/20/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/sso-signin-empty-metadata` --- ### 📝 Commits (5) - [`3c6f48a`](https://github.com/better-auth/better-auth/commit/3c6f48a226b689acf564a4e8550b11d53ee437e0) if metadata doesn't exist, we should auto generate - [`6424dda`](https://github.com/better-auth/better-auth/commit/6424dda160898989005245c292e6e31d78c5ee81) remove unused parts - [`cfc83eb`](https://github.com/better-auth/better-auth/commit/cfc83ebbcabeeb581e206aa7646d2d8b962b6da1) Update spMetadata - [`7eeefb1`](https://github.com/better-auth/better-auth/commit/7eeefb1ff682e859d7d52a76a3b62aa842ee80f1) Update logic - [`4c1ba4e`](https://github.com/better-auth/better-auth/commit/4c1ba4ea014db2449d593649623af063966ddb5f) lint ### 📊 Changes **1 file changed** (+28 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/sso/src/routes/sso.ts` (+28 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Auto-generate a minimal SAML Service Provider config when SP metadata is missing, preventing SSO sign-in failures. ACS endpoint now accepts form-encoded and JSON payloads. - **Bug Fixes** - Auto-build SP metadata when missing: entityID (spMetadata.entityID or issuer), HTTP-POST ACS at callbackUrl or default /sso/saml2/sp/acs/{providerId}, with wantMessageSigned and nameIDFormat support. - Add allowedMediaTypes to ACS endpoint: application/x-www-form-urlencoded and application/json. <sup>Written for commit 4c1ba4ea014db2449d593649623af063966ddb5f. 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 22:55:32 -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#32060