diff --git a/packages/authentication/src/jwt.ts b/packages/authentication/src/jwt.ts index f1208d99a4..94edf78bf9 100644 --- a/packages/authentication/src/jwt.ts +++ b/packages/authentication/src/jwt.ts @@ -94,7 +94,7 @@ export class JWTStrategy extends AuthenticationBaseStrategy { throw new NotAuthenticated(`Could not find entity service`); } - const result = await entityService.get(id, omit(params, 'provider')); + const result = await entityService.get(id, omit(params, 'provider', 'query')); if (!params.provider) { return result; diff --git a/packages/authentication/test/jwt.test.ts b/packages/authentication/test/jwt.test.ts index 932fa0ed74..4ac229c616 100644 --- a/packages/authentication/test/jwt.test.ts +++ b/packages/authentication/test/jwt.test.ts @@ -75,10 +75,14 @@ describe('authentication/jwt', () => { app.setup(); }); - it('getEntity', async () => { + it('getEntity (and params.query)', async () => { const [ strategy ] = app.service('authentication').getStrategies('jwt') as JWTStrategy[]; - let entity = await strategy.getEntity(user.id, {}); + let entity = await strategy.getEntity(user.id, { + query: { + name: 'Dave' + } + }); assert.deepStrictEqual(entity, user);