Getting the message of "api.access.deny" from Auth0 js

So I am currently migrating our authentication built using NextJS and NextAuth to Auth0. I fully customized the login form of the Auth0 using the customized version of it and fully mimic the UI of our previous login form using only HTML/CSS and JS. In our previous implementation of our authentication, the “Please verify your email first” message is in the login page itself. I can implement this one using Action in Auth0 and using a custom action for post-login and returning a message using api.access.deny if the user’s email is not verified.

Now the problem is, There’s no way I can parse that one using only the Auth0.js library. I don’t get any errors but it is treated as success and it always redirect to the redirect callback with the hash fragments and the error message on it.