An issue exists in the `SAML.handleCallback()` function where it fails to consume RelayState, record assertion identifiers, or enforce `Response.InResponseTo`. In Service Provider (SP)-initiated flows, an attacker with a valid SAML response and matching RelayState can resubmit them to the `/recipe/saml/callback` endpoint before the assertion expires. In Identity Provider (IdP)-initiated flows, assertions can be replayed without RelayState. Additionally, the lack of `Response.InResponseTo` checks allows an active login to be completed using an assertion for a different identity and bypasses the `allowIDPInitiatedLogin=false` setting. The callback also fails to validate Destination or SubjectConfirmationData Recipient and NotOnOrAfter, resulting in the creation of a new authorization code for the captured user's identity.