[PR #8643] fix(sso): read SAML InResponseTo from correct path #16359

Closed
opened 2026-04-13 10:30:09 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/8643

State: closed
Merged: No


Summary

  • Fix SAML InResponseTo validation always failing because the value was read from the wrong path on samlify's extract result
  • samlify's extractor nests InResponseTo under extract.response.inResponseTo, but the login callback (callbackSSOSAML) and ACS endpoint (acsEndpoint) were reading extract.inResponseTo, which is always undefined
  • The logout handler already reads from the correct path (extract?.response?.inResponseTo), confirming the correct structure

Fixes #8607

Test plan

  • Verify SAML SSO login with enableInResponseToValidation enabled no longer fails with "InResponseTo mismatch" errors
  • Verify IdP-initiated SAML login still works when allowIdpInitiated is true
  • Verify the ACS endpoint also correctly validates InResponseTo when enabled
**Original Pull Request:** https://github.com/better-auth/better-auth/pull/8643 **State:** closed **Merged:** No --- ## Summary - Fix SAML `InResponseTo` validation always failing because the value was read from the wrong path on samlify's extract result - samlify's extractor nests `InResponseTo` under `extract.response.inResponseTo`, but the login callback (`callbackSSOSAML`) and ACS endpoint (`acsEndpoint`) were reading `extract.inResponseTo`, which is always `undefined` - The logout handler already reads from the correct path (`extract?.response?.inResponseTo`), confirming the correct structure Fixes #8607 ## Test plan - [ ] Verify SAML SSO login with `enableInResponseToValidation` enabled no longer fails with "InResponseTo mismatch" errors - [ ] Verify IdP-initiated SAML login still works when `allowIdpInitiated` is true - [ ] Verify the ACS endpoint also correctly validates `InResponseTo` when enabled
GiteaMirror added the pull-request label 2026-04-13 10:30:09 -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#16359