Error in new .NET 6 project

I am following the quick start guide with a brand new .NET 6 project. I can click Login and be taken to the Auth0 login dialog, but upon returning I receive this error:

SecurityTokenSignatureKeyNotFoundException: IDX10503: Signature validation failed. Token does not have a kid. Keys tried: ‘System.Text.StringBuilder’.
Exceptions caught:
‘System.Text.StringBuilder’.
token: ‘System.IdentityModel.Tokens.Jwt.JwtSecurityToken’.

System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(string token, TokenValidationParameters validationParameters)

Exception: An error was encountered while handling the remote login.

Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler.HandleRequestAsync()

Please help

Hey there!

Can you share a link to the quickstart so we can help you troubleshoot that? Thank you!

Sure thing. It is the ASP.NET MVC Documentation here: Auth0 ASP.NET Core MVC SDK Quickstarts: Add Login to your ASP.NET MVC application

Perfect! Thanks for sharing that! Can I ask you to raise it as a GitHub issue here:

this way we’ll be able to handle it most effectively and work with the direct repo maintainers on it. Once you have a link to it make sure to share it here so we can ping them. Thank you!

Thanks Konrad. I added this issue:

I cloned the quickstart and changed it to use .net 6 and am seeing the same error.

1 Like

Thanks for doing that! I’ll ping the repo maintainers in a few minutes!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.