如果B2C post_logout_redirect_uri在SAML上无法正常工作,可能是由于以下原因之一:
post_logout_redirect_uri未正确配置:确保在SAML配置中正确设置了post_logout_redirect_uri。这通常是在SAML请求中的samlp:LogoutRequest元素中设置的。确保该值与应用程序中的配置相匹配。
SAML响应中没有包含post_logout_redirect_uri:检查SAML响应,确保它包含了一个samlp:LogoutResponse元素,并且其中包含了正确的post_logout_redirect_uri。这通常是通过将post_logout_redirect_uri作为samlp:LogoutRequest元素的属性传递给身份提供者来实现的。
以下是一个示例代码,演示了如何在SAML中设置post_logout_redirect_uri:
https://sp.example.com/metadata
user@example.com
session_index_id
Extension content
以上示例代码中,post_logout_redirect_uri被设置为"https://example.com/logout"。确保根据你的应用程序要求进行相应的更改。
如果仍然无法解决问题,建议检查身份提供者和应用程序的文档,或者联系相关支持团队,以获取更详细的帮助和指导。