[GH-ISSUE #4833] SAML SSO: spMetadata should be automatically generated by better-auth #10084

Closed
opened 2026-04-13 06:00:04 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @GigaDroid on GitHub (Sep 23, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/4833

Originally assigned to: @dvanmali on GitHub.

Is this suited for github?

  • Yes, this is suited for github

We just started rolling out SSO for our first customers, and honestly the current setup feels unnecessarily clunky.

The biggest issue: spMetadata handling makes little sense in its current form. Right now we’re forced to hand-craft metadata, when in reality this should be generated automatically by better-auth based on its expectations.

For example, properties like <AssertionConsumerService> and <NameIDFormat> are not optional, they’re fundamental. These should be configured out of the box, instead of developers having to guess and debug why things break.

It took us quite some time to figure out why Keycloak wasn’t working with better-auth, and the root cause turned out to be as trivial as a missing <AssertionConsumerService> in the spMetadata.

This kind of manual trial-and-error is exactly what SSO should remove, not introduce.

Describe the solution you'd like

spMetadata should be generated automatically by better-auth

Describe alternatives you've considered

Constructing spMetadata manually

Additional context

No response

Originally created by @GigaDroid on GitHub (Sep 23, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/4833 Originally assigned to: @dvanmali on GitHub. ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. We just started rolling out SSO for our first customers, and honestly the current setup feels unnecessarily clunky. The biggest issue: spMetadata handling makes little sense in its current form. Right now we’re forced to hand-craft metadata, when in reality this should be generated automatically by better-auth based on its expectations. For example, properties like `<AssertionConsumerService>` and `<NameIDFormat>` are not optional, they’re fundamental. These should be configured out of the box, instead of developers having to guess and debug why things break. It took us quite some time to figure out why Keycloak wasn’t working with better-auth, and the root cause turned out to be as trivial as a missing `<AssertionConsumerService>` in the spMetadata. This kind of manual trial-and-error is exactly what SSO should remove, not introduce. ### Describe the solution you'd like spMetadata should be generated automatically by better-auth ### Describe alternatives you've considered Constructing spMetadata manually ### Additional context _No response_
GiteaMirror added the enhancementlocked labels 2026-04-13 06:00:04 -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#10084