oidc-client-js中的回调后无响应状态 [英] No state in response after callback in oidc-client-js

查看:324
本文介绍了oidc-client-js中的回调后无响应状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这是与角度5.2.8及更高版本有关的错误. 6. 与角5.2.7正常工作. 我创建了一个 ng5分支,并将angular更新到最新的5.2. .8和错误com进入! 任何人都可以通过oidc-client-js将我定向到有角度的5.2.8及更高版本的示例?

I think this is an error related to angular 5.2.8 & 6 . With angular 5.2.7 work fine. I create a ng5 branch and update angular to latest 5.2.8 and the error com in! anybody can direct me to an angular 5.2.8 and later sample with oidc-client-js ?

推荐答案

这是由于window.location.hash中状态的URI编码引起的. 对我来说,此问题可以解决:

It is caused by URI encoding of state in the window.location.hash. For me this fix the issue:

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();
}

这篇关于oidc-client-js中的回调后无响应状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆