Skip to content

Commit 43d8a08

Browse files
authored
fix(authentication-oauth): Fix regression using incorrect callback and redirect_uri (#2631)
1 parent 72b980e commit 43d8a08

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • packages/authentication-oauth/src

packages/authentication-oauth/src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ export const setup = (options: OauthSetupSettings) => (app: Application) => {
4141
}
4242
}
4343

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

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

0 commit comments

Comments
 (0)