Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/server/routes/callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default async (req, res, options, done) => {
// e.g. option to send users to a new account landing page on initial login
// Note that the callback URL is preserved, so the journey can still be resumed
if (isNewUser && pages.newUser) {
return redirect(pages.newUser)
return redirect(`${pages.newUser}${pages.newUser.includes('?') ? '&' : '?'}callbackUrl=${encodeURIComponent(callbackUrl)}`)
}

// Callback URL is already verified at this point, so safe to use if specified
Expand Down Expand Up @@ -200,7 +200,7 @@ export default async (req, res, options, done) => {
// e.g. option to send users to a new account landing page on initial login
// Note that the callback URL is preserved, so the journey can still be resumed
if (isNewUser && pages.newUser) {
return redirect(pages.newUser)
return redirect(`${pages.newUser}${pages.newUser.includes('?') ? '&' : '?'}callbackUrl=${encodeURIComponent(callbackUrl)}`)
}

// Callback URL is already verified at this point, so safe to use if specified
Expand Down