Please check the comments of https://github.com/crewjam/saml/pull/449#issuecomment-1680238377 and apply it to this fork.