Closed dinodeSimon closed 5 years ago
Ok, what do you think if we can add it as an option? Can you make a PR with that?
Hi José,
No problems, we will have a think about a neat way to do it and put a PR up in the next couple of days.
Hi, we've made a PR here: https://github.com/josx/ra-data-feathers/pull/112 Any thoughts?
@TheHyphen I have merged you code, I think will help @dinodeSimon
Thank you! When do you think this change might make it to an npm release?
Thanks a ton! ✌️
We are working with an API that sends a 403 HTTP status code when trying to delete an item that a user doesn't have permissions to delete. Currently the auto provider is seeing this 403 response and logging the user out completely.
Looking back through the history the addition of the piece of code to log the users out on 403 responses in addition to 401 was added to the auth provider a year ago.
https://github.com/josx/ra-data-feathers/commit/574ee17ac4028407eb32983dc08293c31840dcfe
Is it possible to change this so that the http codes which trigger a logout can be passed in with the options? That way we choose to log out on 401 responses and handle 403 responses for a particular item rather than logging the user out.