Auth0 Home Blog Docs

Problem with embedded lock in ASP.NET Core Sample Project



I download the sample at:

Unzip, load in to Visual Studio 2017

Check the Client Secret, Client Id and Domain.

Run the app.

Click the Login button (top right)

![alt text][1]

The Auth0 lock is correctly displayed.

![alt text][2]

Enter my credentials.

I get the following error. (The actual error message contains more information but has shows keys that I don’t want to display on a public forum)

An unhandled exception occurred while processing the request.
SecurityTokenInvalidSignatureException: IDX10503: Signature validation failed. Keys tried: 'Microsoft.IdentityModel.Tokens.X509SecurityKey , KeyId:


Go to your client in the Auth0 dashboard. Under the settings tab, go to “Show Advanced Settings”, and configure the “JsonWebToken Signature Algorithm” t o RS256. Save the settings, and try again.

Alternatively, if you want to stick with HS256, you can refer to this sample:

Specifically, you will need to configure the TokenValidationParameters, as per these lines:


Jerrie, thanks for that. It worked a treat. Cheers.