# Problem with embedded lock in ASP.NET Core Sample Project

**URL:** <https://community.auth0.com/t/problem-with-embedded-lock-in-asp-net-core-sample-project/6227>\
**Category:** Get Help\
**Tags:** sample-project, aspnet-core, embedded-lock\
**Created:** [April 15, 2017, 3:43pm UTC](https://community.auth0.com/t/problem-with-embedded-lock-in-asp-net-core-sample-project/6227 "2017-04-15T15:43:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephen.webb](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephen.webb/32/8834_2.png) [@stephen.webb](https://community.auth0.com/u/stephen.webb)\
**Post date:** [April 15, 2017, 3:43pm UTC](https://community.auth0.com/t/problem-with-embedded-lock-in-asp-net-core-sample-project/6227/1 "2017-04-15T15:43:45Z")

</div>

I download the sample at:  
[https://auth0.com/docs/quickstart/webapp/aspnet-core/02-login-embedded-lock](https://auth0.com/docs/quickstart/webapp/aspnet-core/02-login-embedded-lock)

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:_

---

<div class="post-metadata">

**Author:** ![jerrie](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jerrie/32/5898_2.png) [@jerrie](https://community.auth0.com/u/jerrie)\
**Post date:** [April 17, 2017, 6:40am UTC](https://community.auth0.com/t/problem-with-embedded-lock-in-asp-net-core-sample-project/6227/2 "2017-04-17T06:40:31Z")

</div>

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:  
[https://github.com/auth0-samples/auth0-aspnetcore-oidc-hs256](https://github.com/auth0-samples/auth0-aspnetcore-oidc-hs256)

Specifically, you will need to configure the `TokenValidationParameters`, as per these lines:  
[https://github.com/auth0-samples/auth0-aspnetcore-oidc-hs256/blob/master/src/AspNetCoreOidcSample/Startup.cs#L143-L146](https://github.com/auth0-samples/auth0-aspnetcore-oidc-hs256/blob/master/src/AspNetCoreOidcSample/Startup.cs#L143-L146)

---

<div class="post-metadata">

**Author:** ![stephen.webb](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephen.webb/32/8834_2.png) [@stephen.webb](https://community.auth0.com/u/stephen.webb)\
**Post date:** [April 17, 2017, 1:25pm UTC](https://community.auth0.com/t/problem-with-embedded-lock-in-asp-net-core-sample-project/6227/3 "2017-04-17T13:25:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:53am UTC](https://community.auth0.com/t/problem-with-embedded-lock-in-asp-net-core-sample-project/6227/4 "2018-03-02T05:53:16Z")

</div>


