Lock widget doesn't properly sign up a user: "“WE'RE SORRY, SOMETHING WENT WRONG WHEN ATTEMPTING TO LOG IN.“"

When we try to sign up a user in our Electron application using the Lock widget, the user gets signed up and a verification email gets sent. However the lock widget goes to say:

“WE’RE SORRY, SOMETHING WENT WRONG WHEN ATTEMPTING TO LOG IN.“

If the user goes in to their email and verifies the account, they can log into the account just fine.

I feel this issue has to do with the lock widget attempting to auto-login the user when instead the user needs to be verified via email… But I’m not entirely sure as there are no errors being logged in any way.

If you do not want your users to be logged in directly after signup, you can set the loginAfterSignup attribute in Lock:

var option = {
  loginAfterSignUp: false
};

https://auth0.com/docs/libraries/lock/v10/customization#loginaftersignup-boolean-

The Lock error may be due to a Rule that is returning an Unauthorized response due to an unverified email, as Lock tries to log the user in straight away. Setting the above loginAfterSignup to false will prevent Lock from trying to login the user.