feat: SW-162 Updated redirect to rewrite reducing unnecessary redirects for user
This commit is contained in:
@@ -15,6 +15,7 @@ export async function GET(
|
||||
let redirectTo: string
|
||||
|
||||
const returnUrl = request.headers.get("x-returnurl")
|
||||
const isMFA = request.headers.get("mfa-login")
|
||||
|
||||
if (returnUrl) {
|
||||
// Seamless login request from Current web
|
||||
@@ -85,8 +86,9 @@ export async function GET(
|
||||
console.log({ login_env: process.env })
|
||||
|
||||
console.log({ login_redirectTo: redirectTo })
|
||||
const signInProvider = isMFA ? "curity-mfa" : "curity"
|
||||
const redirectUrl = await signIn(
|
||||
"curity",
|
||||
signInProvider,
|
||||
{
|
||||
redirectTo,
|
||||
redirect: false,
|
||||
|
||||
Reference in New Issue
Block a user