Skip to content

Commit

Permalink
fix(authentication-oauth): Fix regression using incorrect callback an…
Browse files Browse the repository at this point in the history
…d redirect_uri (#2631)
  • Loading branch information
johnheenan authored May 23, 2022
1 parent 72b980e commit 43d8a08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/authentication-oauth/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ export const setup = (options: OauthSetupSettings) => (app: Application) => {
}
}

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

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

0 comments on commit 43d8a08

Please sign in to comment.