Skip to content

Commit

Permalink
fix(authentication-oauth): Fix issue with overriding the default Gran…
Browse files Browse the repository at this point in the history
…t configuration (#2615)
  • Loading branch information
cciocov authored May 1, 2022
1 parent 6d43734 commit b345857
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/authentication-oauth/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import merge from 'lodash/merge';
import defaultsDeep from 'lodash/defaultsDeep';
import each from 'lodash/each';
import omit from 'lodash/omit';
import { createDebug } from '@feathersjs/commons';
Expand Down Expand Up @@ -41,14 +41,14 @@ export const setup = (options: OauthSetupSettings) => (app: Application) => {
}
}

const grant = merge({
const grant = defaultsDeep({}, omit(oauth, 'redirect'), {
defaults: {
prefix,
origin: `${protocol}://${host}`,
transport: 'session',
response: ['tokens', 'raw', 'profile']
}
}, omit(oauth, 'redirect'));
});

const getUrl = (url: string) => {
const { defaults } = grant;
Expand Down

0 comments on commit b345857

Please sign in to comment.