cross-domain - 如果第三方 cookie 被阻止,则使用 oidc-client 跨域进行静默续订
问题描述
我们有两个 SPA 应用程序,它们与同一个 IdentityProvider 交互。我们实现了 oidc-client 并且 SSO 运行良好。现在我们认识到,如果第三方 cookie 被阻止,静默身份验证将不起作用,这是一个大问题。
默认情况下,Safari、Firefox 等浏览器已经阻止第三方 cookie。在 SPA 应用程序中执行 Session_Management 和 Access_Token 管理的推荐方法是什么。
我们不希望用户再次登录,如果 IdentityProvider 上的 Session 仍然处于活动状态(会话处于活动状态 14 天,具有滑动到期)。
我有哪些选择?
解决方案
Based on the comments on the OP and having experimented a bit... If I set the auth cookie to SameSite=Lax then iframe-based silent calls do not work but top-level redirects are not affected. Therefore SameSite=Lax breaks OIDC and thus it's necessary to have a comprehensive CSRF solution in place instead if you wish to use the standard client side pattern.
推荐阅读
- json - 出现错误##[错误]其中一个部署参数的键为空。运行管道以部署 AKS 群集时
- javascript - 使用 Calc CSS 函数后将 Div 定位在角落
- php - 来自mysql数据库的PHP Count搜索结果
- docker - 我可以在另一台机器上为 docker 使用计算机电源吗?
- jvm - 如何更改 hsperfdata 默认目录?
- python - Getting int error, but I do not know why. My file has no extra spaces
- mongodb - 无法将 tableau 连接到 MongoDB
- firebase - 为什么 Firebase 会返回已删除的帐户?
- php - 使用 Selenium PHP 和 Laravel 执行期间未定义的类常量 'pageLoadStrategy' {"exception":"[object] 错误
- c - 这个指针数组是如何打印出这个意想不到的结果的?