Skip to content

Commit

Permalink
fix: respect id from user options in signinUrl and callbackUrl
Browse files Browse the repository at this point in the history
…id (#2698)
  • Loading branch information
Mathis Møller authored Sep 8, 2021
1 parent 17bea4a commit 819e97e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/lib/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default function parseProviders(params: {
const { providers = [], base } = params
return providers.map(({ options, ...defaultOptions }) =>
merge(defaultOptions, {
signinUrl: `${base}/signin/${defaultOptions.id}`,
callbackUrl: `${base}/callback/${defaultOptions.id}`,
signinUrl: `${base}/signin/${options?.id ?? defaultOptions.id}`,
callbackUrl: `${base}/callback/${options?.id ?? defaultOptions.id}`,
...options,
})
)
Expand Down

0 comments on commit 819e97e

Please sign in to comment.