Skip to content

Commit b345857

Browse files
authored
fix(authentication-oauth): Fix issue with overriding the default Grant configuration (#2615)
1 parent 6d43734 commit b345857

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • packages/authentication-oauth/src

packages/authentication-oauth/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import merge from 'lodash/merge';
1+
import defaultsDeep from 'lodash/defaultsDeep';
22
import each from 'lodash/each';
33
import omit from 'lodash/omit';
44
import { createDebug } from '@feathersjs/commons';
@@ -41,14 +41,14 @@ export const setup = (options: OauthSetupSettings) => (app: Application) => {
4141
}
4242
}
4343

44-
const grant = merge({
44+
const grant = defaultsDeep({}, omit(oauth, 'redirect'), {
4545
defaults: {
4646
prefix,
4747
origin: `${protocol}://${host}`,
4848
transport: 'session',
4949
response: ['tokens', 'raw', 'profile']
5050
}
51-
}, omit(oauth, 'redirect'));
51+
});
5252

5353
const getUrl = (url: string) => {
5454
const { defaults } = grant;

0 commit comments

Comments
 (0)