我正在使用带有OpenID Connect的IdentityServer3来对数据库用户进行身份验证,有时候(不清楚何时无法手动恢复问题)我收到消息'Bad request - Request too long. the size of the request headers is too long' .
现在问题出现在Google Chrome MF上 . 删除cookie后,该网站将正常运行 . 我正在运行OpenID Connect软件包4.0.0版 .
该问题是由openid connect创建的nonce cookie引起的 . 当它显示错误时,此时,浏览器(Chrome,Firefox和Edge)中存在超过20个这样的cookie . 我尝试了不同的东西,但仍然没有解决方案:
-
将软件包降级到版本3.0.0也没有解决它 . 新版本的相关软件包引起的额外问题 .
-
按照建议删除旧的Nonce cookie
https://github.com/IdentityServer/IdentityServer3/issues/1124帮助Nonce Cookies,但没有使用SignInMessage重复的Cookie发生问题的次数 -
我将SignInMessageThreshold配置为1,没有帮助
-
我试图添加Kentor.OwinCookieSaver但它没有帮助
这是错误发生时cookie的显示方式:
cookies error image
经过几个小时的搜索和尝试,我发现cookie的路径是“/ identity”,nonce是“/” .
我不知道但也许这就是问题所在:当我编写删除Nonce的代码时,我也试图获取signInMessage cookie,我看到只有路径为“/”的那些才在列表中,但是signInMessage cookie不在cookie列表中 .
如果是这个问题,你能告诉我为什么会这样吗?