我认为这是与 Angular 5.2.8 & 6 相关的错误。
与 Angular 5.2.7 一起工作正常。
我创建一个ng5分支 https://github.com/client-sdk-samples/sample-angular-OidcClient/tree/ng5并将 Angular 更新到最新的 5.2.8 并出现错误 com!
任何人都可以引导我使用 oidc-client-js 获取 Angular 5.2.8 及更高版本的示例吗?
这是由 window.location.hash 中状态的 URI 编码引起的。
对我来说这解决了这个问题:
if (window.location.hash) {
window.location.hash = decodeURIComponent(window.location.hash);
// authorizedCallback returns wrong result when hash is URI encoded
this.oidcSecurityService.authorizedCallback();
} else {
this.oidcSecurityService.authorize();
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)