angular - automaticSilentRenew 不适用于角度 oidc-client 库
问题描述
我正在使用 "oidc-client": "1.10.1" 进行 oidc 身份验证,下面是我对 userManager 的配置
const settings = {
authority: (window as any).__env.auth.authority, //OAuth 2.0 authorization endpoint of the OpenID Provider
client_id: (window as any).__env.auth.clientID, //
redirect_uri: (window as any).__env.auth.redirectUri, //callback URI for the authentication response
response_type: 'id_token token',
scope: 'openid profile api',
automaticSilentRenew: true,
silent_redirect_uri: (window as any).__env.auth.silentRedirectUri,
userStore: new WebStorageStateStore({ store: window.localStorage }),
loadUserInfo: true,
post_logout_redirect_uri: (window as any).__env.auth.postLogoutRedirectUri,
silentRequestTimeout: 30000,
};
甚至没有进行静默更新令牌调用,即用户在令牌到期后注销。我错过了什么吗?
PS我想让令牌自动更新工作,因为我手动尝试了令牌更新,它确实有效,但似乎不是一种可靠的方法。
解决方案
推荐阅读
- architecture - 用于跨多个数据库从单个有效负载提交多个大型记录的系统架构
- eclipse - Eclipse - 无法完成安装,因为找不到一个或多个必需项目(解压缩安装任务)
- angular - 无响应:无法 dockerize 和运行 Angular 应用程序
- python - 计算列中gps坐标之间的距离
- python - 使用 pdf2image 将 PDF 转换为图像不起作用
- gradle - 如何将子项目生成的类添加到 Gradle 中 WAR 文件的 WEB-INF/classes 目录
- android - 长度过滤器不适用于 textview ?- 安卓
- typescript - api 数据验证的最佳实践
- python - 在 Python Clicker 游戏中每秒添加硬币
- amazon-web-services - 使用 AWS cli 所需的 Amazon EMR 集群详细信息