From 04c7c83eeaa6a7466c84b958071b468ed42f0b0f Mon Sep 17 00:00:00 2001 From: Fraser Date: Thu, 24 Jun 2021 01:26:44 +0800 Subject: [PATCH] fix(authentication-oauth): Omit query from internal calls (#2398) --- packages/authentication-oauth/src/strategy.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/authentication-oauth/src/strategy.ts b/packages/authentication-oauth/src/strategy.ts index f9883cc1ff..7a552a56c8 100644 --- a/packages/authentication-oauth/src/strategy.ts +++ b/packages/authentication-oauth/src/strategy.ts @@ -6,7 +6,7 @@ import { } from '@feathersjs/authentication'; import { Params } from '@feathersjs/feathers'; import { NotAuthenticated } from '@feathersjs/errors'; -import { createDebug } from '@feathersjs/commons'; +import { createDebug, _ } from '@feathersjs/commons'; const debug = createDebug('@feathersjs/authentication-oauth/strategy'); @@ -109,7 +109,7 @@ export class OAuthStrategy extends AuthenticationBaseStrategy { debug('createEntity with data', data); - return this.entityService.create(data, params); + return this.entityService.create(data, _.omit(params, 'query')); } async updateEntity (entity: any, profile: OAuthProfile, params: Params) { @@ -118,7 +118,7 @@ export class OAuthStrategy extends AuthenticationBaseStrategy { debug(`updateEntity with id ${id} and data`, data); - return this.entityService.patch(id, data, params); + return this.entityService.patch(id, data, _.omit(params, 'query')); } async getEntity (result: any, params: Params) { @@ -134,7 +134,7 @@ export class OAuthStrategy extends AuthenticationBaseStrategy { } return entityService.get(result[entityId], { - ...params, + ..._.omit(params, 'query'), [entity]: result }); }