Hi
I am trying to use the embedded Lock v11 control with asp.net core. For the server side, I have setup based on the sample provided here: Auth0 ASP.NET Core MVC SDK Quickstarts: Login. Note that it is working for me when I use the following approach:
public async Task Login(string returnUrl = "/")
{
await HttpContext.ChallengeAsync("Auth0", new AuthenticationProperties() { RedirectUri = returnUrl });
}
However, when I try to login using Lock embedded in my cshtml, I get the following error:
Here is my front end code:
$(function () {
var originUrl = "@($"{Context.Request.Scheme}://{Context.Request.Host}")";
var callbackUrl = originUrl + "/signin-auth0";
var logoUrl = originUrl + "/images/logo.png";
var lock = new Auth0Lock(
'@Model.Auth0.ClientId',
'@Model.Auth0.Domain',
{
container: 'root',
theme: {
logo: logoUrl,
primaryColor: '#0064D2'
},
languageDictionary: {
title: "Secure Messaging"
},
auth: {
redirectUrl: callbackUrl, // If not specified, defaults to the current page
responseType: 'code',
//responseMode: 'form_post',
sso: true,
params: {
scope: 'openid name profile email roles'
}
},
allowForgotPassword: true
}
);
lock.show();
});
Note that this was kind-of reported in this topic, but was closed without resolution: Embedded lock with ASP.Net Core 2.0
Thanks in advance
Zawar