Merged in fix/SW-2506-login-with-verification-link- (pull request #2316)
fix: SW-2506 Booking flow login with magic link fix * fix: SW-2506 Booking flow login with magic link fix Approved-by: Michael Zetterberg
This commit is contained in:
@@ -49,6 +49,15 @@ export async function GET(
|
||||
// Update Seamless login url as Magic link login has a different authenticator in Curity
|
||||
redirectTo = redirectTo.replace("updatelogin", "updateloginemail")
|
||||
|
||||
// https://scandichotels.atlassian.net/browse/SW-2506
|
||||
// Encode the returnUrl which is passed as search parameter to the old web.
|
||||
// Use of substring because creating URL object and using searchParams causes partial param retrival
|
||||
const returnUrl = redirectTo.substring(redirectTo.indexOf("returnurl=") + 10)
|
||||
redirectTo = redirectTo.replace(
|
||||
/returnurl.*/gi,
|
||||
"returnurl=" + encodeURIComponent(returnUrl)
|
||||
)
|
||||
|
||||
try {
|
||||
console.log(`[verifymagiclink] final redirectUrl: ${redirectTo}`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user