Repository navigation
docs: move the SAML ACS URL to /sp/acs and document IdP-initiated sign-in [ENG-1736] - #33
Merged
Merged
Conversation
…n-in [ENG-1736] Better Auth 1.7.1 serves the ACS at /api/auth/sso/saml2/sp/acs/<id>; the old /saml2/callback/<id> path answers 404. It also checks the assertion's Recipient and Destination against that URL, and refuses IdP-initiated sign-ins unless SSO_SAML_ALLOW_IDP_INITIATED=true, which the API already reads. The Audience is still SSO_SAML_ISSUER. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhM4wHR2xPP8bbrkXGaqUD
|
| Topic | Details | ||||||
|---|---|---|---|---|---|---|---|
| SAML SSO Guidance | Document the new SAML ACS and SP metadata endpoints, require matching Recipient and Destination URLs, clarify that the Audience remains SSO_SAML_ISSUER, and add troubleshooting and configuration guidance for IdP-initiated sign-ins via SSO_SAML_ALLOW_IDP_INITIATED.Modified files (3)
Latest Contributors(1)
| ||||||
| SAML Upgrade Notes | Warn on-prem customers about the breaking SAML endpoint and IdP-initiated sign-in changes, and provide upgrade steps plus the new environment variable in the release notes.Modified files (1)
Latest Contributors(1)
|
twk3
commented
Oct 14, 2026
… [ENG-1736] "Okta does this by default" did not say what Okta does. The upgrade note now also says the services keep serving while the scheduler migrates, and which reads can leave out older runs until it is done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhM4wHR2xPP8bbrkXGaqUD
twk3
marked this pull request as ready for review
October 14, 2026 17:59
The .env.example summary gave /acs/okta while SSO_SAML_PROVIDER_ID defaults to onprem-saml, and the SP metadata URL read as if okta were literal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhM4wHR2xPP8bbrkXGaqUD
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the SAML SSO docs for Better Auth 1.7.1, which this release ships (ENG-1736). Both changes break SSO sign-in for an install that doesn't act, so the CHANGELOG lists them as Breaking Changes.
What changed in the API
/api/auth/sso/saml2/callback/<provider id>to/api/auth/sso/saml2/sp/acs/<provider id>. The old path answers404; there is no redirect.SSO_SAML_ALLOW_IDP_INITIATED=true, which it already reads, but which wasn't documented.SSO_SAML_ISSUER. Better Auth uses the configured issuer as the SP entity ID, and the expected audience is that entity ID, so the Audience doesn't change./api/auth/sso/saml2/sp/metadata?providerId=<provider id>. The env-configured provider is found there too.Changes
docs/sso-saml.md:SSO_SAML_ALLOW_IDP_INITIATEDin the optional settings;on-prem/.env.example: the new ACS URL in the setup summary, and a commentedSSO_SAML_ALLOW_IDP_INITIATEDline.docs/configuration.md: the ACS URL in the provider id row, and a row for the new variable.on-prem/CHANGELOG.md[Unreleased]:SSO_SAML_ALLOW_IDP_INITIATED.No compose change:
apireads.envthroughenv_file, so the new variable reaches it as is.SSO_SAML_SP_CERT_FILEwas already removed in #31.Testing
Docs only. The behavior was read from the API (
packages/api/src/lib/sso.ts,config.ts) and from@better-auth/sso1.7.1 (createSP,getExpectedSAMLRecipients,findSAMLProvider,spMetadata). It wasn't exercised against a real IdP.Related
Checklist
(fix|feat|chore): title [CSR-xxx]🤖 Generated with Claude Code
https://claude.ai/code/session_01UhM4wHR2xPP8bbrkXGaqUD
Need help on this PR? Tag
@codesmith-botwith what you need.