Skip to content

Commit 04c7c83

Browse files
authored
fix(authentication-oauth): Omit query from internal calls (#2398)
1 parent f9431f2 commit 04c7c83

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/authentication-oauth/src/strategy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from '@feathersjs/authentication';
77
import { Params } from '@feathersjs/feathers';
88
import { NotAuthenticated } from '@feathersjs/errors';
9-
import { createDebug } from '@feathersjs/commons';
9+
import { createDebug, _ } from '@feathersjs/commons';
1010

1111
const debug = createDebug('@feathersjs/authentication-oauth/strategy');
1212

@@ -109,7 +109,7 @@ export class OAuthStrategy extends AuthenticationBaseStrategy {
109109

110110
debug('createEntity with data', data);
111111

112-
return this.entityService.create(data, params);
112+
return this.entityService.create(data, _.omit(params, 'query'));
113113
}
114114

115115
async updateEntity (entity: any, profile: OAuthProfile, params: Params) {
@@ -118,7 +118,7 @@ export class OAuthStrategy extends AuthenticationBaseStrategy {
118118

119119
debug(`updateEntity with id ${id} and data`, data);
120120

121-
return this.entityService.patch(id, data, params);
121+
return this.entityService.patch(id, data, _.omit(params, 'query'));
122122
}
123123

124124
async getEntity (result: any, params: Params) {
@@ -134,7 +134,7 @@ export class OAuthStrategy extends AuthenticationBaseStrategy {
134134
}
135135

136136
return entityService.get(result[entityId], {
137-
...params,
137+
..._.omit(params, 'query'),
138138
[entity]: result
139139
});
140140
}

0 commit comments

Comments
 (0)