react-query-auth
react-query-auth copied to clipboard
How to manage login errors
Hi ! Thanks for your package
I am wondering, how to pass the server response message all the way to the View using useAuth ? I played with the axios interceptors but the login function would always succeed but even if I promise.reject in the loginFn, how to get the message to the useAuth props ?
Hope I was clear, it is a very generic issue to be honest. Logging in wrong credentials, 401 error from the backend with a message -> how do I display the message? Thanks !