如何使用React应用程序在SAML身份验证中捕获SAML响应

发布于 2025-02-13 22:28:45 字数 134 浏览 1 评论 0 原文

我们正在尝试使用React App实现SAML身份验证,其中我们将Azure目录用作IDP时,当用户获得身份验证的UI获得http Post request request有效载荷中的SAML响应。但是在客户端(React),我们无法阅读此请求有效载荷。

We are trying to implement SAML authentication with React App where we are using Azure Directory as IDP, when the user gets authenticated UI gets SAML response in HTTP post request payload. But on the client-side (React) we are not able to read this request payload.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

黯然 2025-02-20 22:28:45

对SP的重定向URI的响应。为了处理它,您将需要服务器端逻辑。您可以启用SSR进行反应或创建处理验证回调并将结果转发到水疗中心的API。

看看简单的react and eack and Express app saml okta 用于react spa + spa + Node.js/Express API样本。

Azure AD will post the SAML response to the Redirect URI of the SP. In order to process it you will need server-side logic. You can enable SSR for React or create and API that handles the auth callback and forwards the results to the SPA.

Take a look to Simple React and Express app SAML login by Okta for a React SPA + Node.js/Express API sample.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文