Using api.redirect.sendUserTo('https://{auth0_tenant}') with an error message

I have the same issue with Api.access.deny causes redirect loop and I’m using the accepted solution which is to use the api.redirect.sendUserTo('https://{auth0_tenant}') .

However, following the OP’s example whereby users without the private role will be denied at login, I need to be able to pass a message (e.g. Access Denied due to no private role to the Sign-In page - and then be able to render it in code in the Classic Login Experience.

I’m looking for ideas how to achieve this.

I too am looking for a solution to this problem. In my case I need to display a message about the user’s email address needing to be verified before they can access my app.