iOS: Display custom error message from action access.deny


We are using the auth0/Auth0.swift SDK Version 1.35.0. When returning an error message via a Login-Action, we get a generic error message, instead of the one returned in the action.

We previously had a Rule that checks if a user is verified. If not, we returned
return callback(new UnauthorizedError('our custom error message'));
This worked just fine. We got ‘our custom error message’.

Now we wanted to switch to Actions. Inside the action we return the error like this
api.access.deny('our custom error message');

But instead of our error message, the login shows the generic error, as seen in the screenshot.

What can we do, to display the error passed by api.access.deny() to the user?
In the logs everything looks fine, the error description is ‘our custom error message’. We also have a web app and an Android app were the correct error message is shown and everything works fine.

(First we had the same issue with android, see Android: Access custom error message from action access.deny but an SDK update did not fix it for iOS :grinning:)


Issue doestn occur anymore… don’t ask me why. Sorry!

1 Like

Perfect! Glad to hear that!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.