I have a custom authentication provider which authenticates the user in external systems and returns a dto with some status code.
If the user password is expired I want to be able to communicate it to the user, but if I return false from the TryAuthenticate method then I get an exception in Authenticate method, ending up in my OnServiceException hander. I want to be able to return my dto with the status I will set as expired/invalid etc.
You can throw your own custom exception or HttpError instead of returning false, which will just throws a default
I will try that, thanks