我是Auth0的新手,我想我先下载种子项目来检查它。我正在使用.NET Core。我下载了该项目,但是当我运行它时,出现错误:Auth0种子项目错误
SecurityTokenInvalidSignatureException:IDX10503:签名验证失败。按键的尝试:...
这件事发生后,我尝试了回调的执行期间登录和(http://localhost:5000/signin-auth0)
没有人有一个想法可能是什么问题呢?
感谢
我是Auth0的新手,我想我先下载种子项目来检查它。我正在使用.NET Core。我下载了该项目,但是当我运行它时,出现错误:Auth0种子项目错误
SecurityTokenInvalidSignatureException:IDX10503:签名验证失败。按键的尝试:...
这件事发生后,我尝试了回调的执行期间登录和(http://localhost:5000/signin-auth0)
没有人有一个想法可能是什么问题呢?
感谢
我收到了Auth0论坛的响应(谢谢你,萨科萨比纳),其解决了这个问题:
The .Net Core seed projects are meant to work with the RS256 algorithm by default. To change the algorithm, go to Clients | {Your client} | Settings, then click on the Show advanced settings link, and select the OAuth tab. In the JsonWebToken Signature Algorithm dropdown, select RS256.
切换到RS256后,一切正常。
您应该提供更多信息。您修改过哪些示例项目的哪些部分?该错误指向用于验证可能由于未更新必要配置而导致的JWT令牌的密钥不匹配。还提供了示例项目的链接,使其他人更容易看到代码正在做什么。 –
我没有修改任何东西。该项目随信息预先填入了我的凭据。这是我所指的项目:https://github.com/auth0-samples/auth0-aspnet-owin-mvc-sample – dpdragnev
你提到你正在使用.NET Core;不遵循https://github.com/auth0-samples/auth0-aspnetcore-sample而不是OWIN示例的任何原因?如果您确实遵循链接的ASP .NET Core示例并获得类似的问题,那么还要在问题中包含异常堆栈跟踪。 –