与 SPA(React 或 Angular)共享 Spring OAuth2 客户端会话 cookie

发布于 2025-01-20 17:58:00 字数 298 浏览 1 评论 0原文

(react或Angular)我们可以在流程结束时看到:

应用程序服务器将访问令牌保留和刷新令牌 内部存储,并与浏览器一起创建一个单独的会话 - 通过传统浏览器cookie(h)

。我可以通过传统的浏览器cookie a的流程末端创建与基于浏览器的应用程序单独的会话?还是我必须与我的React或Angular应用共享 sessionID ?但是我该怎么做?

In specification for OAuth 2.0 for Browser-Based Apps (React or Angular) at page 7 for the case when we have backend (BFF) we can see that at the end of the flow:

The application server then keeps the access token and refresh token
stored internally, and creates a separate session with the browser-
based app via a traditional browser cookie (H).

I use spring-security-oauth2-client and new spring-security-oauth2-autorization-server how I can create separate session with the browser-based app via a traditional browser cookie a the end of the flow? Or I have to share sessionId with my React or Angular application? But how I can do this?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文