-
-
Notifications
You must be signed in to change notification settings - Fork 797
Closed
Labels
Milestone
Description
If you have an existing JWT, when an initial reAuthenticate call happens, if the referenced entity does not exist any more (e.g. deleted from users) then the feathers client does not handle this as a failure and no response is delivered to the caller.
We hit this in some tests, but it's easy enough if you either remove the test user from the users collection or supply a JWT with an invalid user ID/sub reference.
I can make this succeed if I change jwt.ts to:
- const result = await entityService.get(id, omit(params, 'provider'));
+ try {
+ const result = await entityService.get(id, omit(params, 'provider'));
+ } catch(err) {
+ throw new NotAuthenticated(`Could not find entity`);
+ }
but I'm not advocating this as a specific approach. The client is clearly not looking for a 404 to come back, but that's what gets delivered back to the feathers authentication client.
Node 12.14
Feathers 4.4.3 (server and client)
Reactions are currently unavailable