Hi! I am using Lock 10 for Web in redirect mode with great success although there is 1 piece of the puzzle missing. I want users who sign up using email and password to confirm their email before being able to sign in. To do that, I’m using force email verified rule. The rule itself works nicely, but I’m having trouble fleshing out the user workflow using Lock 10 for Web:
- The default behavior is that when user signs up he is signed in automatically. This cannot happen since the email has to be verified first. I turn off automatic sign in and then a user who signs up is taken to a screen saying ‘Thanks for signing up’ with a green checkmark. How can I take back users who successfully signed up back to the initial Lock sign in view, preferrably with a notification such as ‘Verify your email and sign in’?
- When a user tries to sign in but his email is not verified, Lock tries to redirect me, as if the auth was successful. I need to display an error message saying the account is not verified instead.
How I googled around and found these two issues:
- Add feature to display custom error messages from rules · Issue #86 · auth0/lock · GitHub
- Lock not showing rule errors in redirect mode · Issue #637 · auth0/lock · GitHub
Maybe they’re related, maybe they’re not. Hard to tell as I’m new to Lock and things change rapidly. I tried using the workaround described in the second github issue but to no avail - as if the error callback never gets called?
Here’s a snippet as to how my lock initialization code looks like: Hastebin: Send and Save Text or Code Snippets for Free | Toptal®
Thanks in advance.