-
-
Notifications
You must be signed in to change notification settings - Fork 797
Description
I'm running the latest feathers version of everything, using the rest client with axios.
I have overridden the create method of my authentication service to return BadRequest in some cases. My issue is that after calling app.authenticate() and receiving the BadRequest error, subsequent calls to any other service also immediately returns the same BadRequest error without making an actual network request. Thus, I am unable to fall back to a non-authenticated service call when a login fails.
As far as I can tell, when the client runs calls the authentication hook in subsequent service calls, it keeps returning the same rejected promise stored in the authentication key (app.get('authentication'))
My current solution is to call app.authentication.reset() on the client side before making subsequent calls to a non-authenticated service. However, the documentation for the reset method reads, "Should not be called directly." Should I be doing something different?
Thanks