Auth0 Home Blog Docs

Handling authorization_error with hosted pages


I recently migrated from embedded lock v10 to Auth0 9.2.2 and lock 11.3.1 with hosted pages.

I have a simple rule that validates if a new user has validated their email address and within my customized hosted page I have added per documentation:

lock.on(‘authorization_error’, function (error) {{
flashMessage: {
type: ‘error’,
text: error.error_description

Previously when I was using the embedded lock, if a new user tried to log in, the message would flash and inform the user they need to verify their email while still within the lock widget and would not allow them past that point. Now however the user is being redirected back to my client page with the error as part of the response, giving the look and feel as if they logged in properly (because they get past the log in Auth0 widget).

I would like the error message to flash like before and not redirect the user back to the client if there is any kind of authorization_error. Is this not possible?


I also experiencing this problem with lock 11.9.1 and hosted pages. It seems like Auth0 did not support flashing error in hosted page.