Auth0 Home Blog Docs

ASP.NET Core 2 not working with embedded Lock: Getting "Exception: Correlation failed."




I am trying to use the embedded Lock v11 control with core. For the server side, I have setup based on the sample provided here: 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(
                    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


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