SignUp to Regular Web App

Hi guys,

I have a product web site where I host custom signup form using Auth0.js. This is my custom JS on top of your Auth0.js:

var webAuth = new auth0.WebAuth({
    domain:       'auth.XXXX.com',
    clientID:     'Yn1lr ..............',
    responseType: 'token',
    redirectUri:  'https://app.XXXXX.com/continue'
  });
 
function doSignUp() {
    .... 
    webAuth.redirect.signupAndLogin({
         connection: databaseConnection,
         email: email,
         password: password,

After successfull signup, user is redirected into app at https://app.XXXXXX.com which is Angular SPA and uses your Auth0 SDK for SPA. So far so good, works great!

Here comes the tricky part.

I have another web site (connect-shopify.XXXXXX.com) for integration with Shopify.com where I want to ask user to either use existing account or create new. Screen has a button [Use existing account] or embedded SignUp form which is very same as code above but differs in responseType and clientID:

var webAuth = new auth0.WebAuth({
    domain:       'auth.XXXX.com',
    clientID:     '78Gde4 ..............',
    responseType: 'code',
    redirectUri:  'https://connect-shopify.XXXXX.com/auth/callback'
  });
 
      webAuth.redirect.signupAndLogin({
         connection: databaseConnection,
         email: email,
         password: password,

Both web sites are built with .NET Core 3.1 and this one (connect-shopify) has been implemented using your wonderfull Quickstart guide for Regular Web App

Button [Use existing account] works also great, redirects user to Auth0 login page, and after successfull login, and after some redirects user ends at connect-shopify.XXXXXX.com/continue where is the rest of integration process flow. Great!

However, SignUp does not work. I end up with this response:

Now listening on: http://[::]:8080
Application started. Press Ctrl+C to shut down.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
      Connection id "0HM0668TOF4O8", Request id "0HM0668TOF4O8:00000001": An unhandled exception was thrown by the application.
System.Exception: An error was encountered while handling the remote login.
 ---> System.Exception: Unable to unprotect the message.State.
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

What could be wrong? ASP.NET is set-up exactly according to your Quickstart docu, copy/paste code.

Thanks

1 Like

I’m receiving the same error and having trouble finding much info.

So, this is 4 months old, and nobody has replied to you it seems… Were you or anyone able to resolve this issue? I am having a similar issue on my app.