Skip to content

Commit

Permalink
fix(authentication-oauth): Omit query from internal calls (#2398)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfrase3 authored Jun 23, 2021
1 parent f9431f2 commit 04c7c83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/authentication-oauth/src/strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -134,7 +134,7 @@ export class OAuthStrategy extends AuthenticationBaseStrategy {
}

return entityService.get(result[entityId], {
...params,
..._.omit(params, 'query'),
[entity]: result
});
}
Expand Down

0 comments on commit 04c7c83

Please # to comment.