Behaviour auth0-react and PostLogin access denied

Hi,

We have a SPA that uses auth0-react for handing authentication. Our login has a Post Login action that sets

{PostLoginAPI} api api.access.deny(message) if the user does not have access tot the requested audience.

We show this message to the end user in react, but unfortunately the user is technically still logged in (in the auth0 login domain) so Auth0 not present the Login dialog again.

I would actually expected that the user would get an error message in the auth0 dialog box if we set api.access.deny(message)

The only way to get out of this seems to be to remove the cookies voor for the login domain (so the user can log in again with another (proper) account.

Is there any way we can make the experience more user friendly if users use the wrong account to log in?

Robert

Bump. Nobody from Auth0 that can shed some light on this?

disappointing that this question is ignored bij Auth0…

1 Like

Still nothing on this ?

BUMP AGAIN!

I have a React app where I need to handle api.access.deny from a post login action and redirect to a dedicated page and not just the login page. the onRedirectCallback prop does not even run when it errors, and there is no other prop on Auth0Provider that allows us to handle login errors.

PLEASE HELP AUTH0!