fix: temp logs
This commit is contained in:
@@ -53,7 +53,7 @@ export async function GET(
|
|||||||
const invalidateResponse = await serverClient().user.invalidateSessions()
|
const invalidateResponse = await serverClient().user.invalidateSessions()
|
||||||
|
|
||||||
let redirectUrlValue
|
let redirectUrlValue
|
||||||
console.log(context.params.lang)
|
|
||||||
switch (context.params.lang) {
|
switch (context.params.lang) {
|
||||||
case Lang.da:
|
case Lang.da:
|
||||||
redirectUrlValue = env.SEAMLESS_LOGOUT_DA
|
redirectUrlValue = env.SEAMLESS_LOGOUT_DA
|
||||||
@@ -74,7 +74,7 @@ export async function GET(
|
|||||||
redirectUrlValue = env.SEAMLESS_LOGOUT_SV
|
redirectUrlValue = env.SEAMLESS_LOGOUT_SV
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
console.log(redirectUrlValue)
|
||||||
const redirectUrl = new URL(redirectUrlValue)
|
const redirectUrl = new URL(redirectUrlValue)
|
||||||
redirectUrl.searchParams.set("returnurl", redirectTo)
|
redirectUrl.searchParams.set("returnurl", redirectTo)
|
||||||
redirectTo = redirectUrl.toString()
|
redirectTo = redirectUrl.toString()
|
||||||
@@ -104,15 +104,15 @@ export async function GET(
|
|||||||
process.env
|
process.env
|
||||||
)
|
)
|
||||||
|
|
||||||
console.log({ logout_signInURL: signOutURL })
|
console.log({ logout_signOutURL: signOutURL })
|
||||||
|
|
||||||
const redirectUrl = await signOut({
|
const redirectUrlObj = await signOut({
|
||||||
redirectTo,
|
redirectTo,
|
||||||
redirect: false,
|
redirect: false,
|
||||||
})
|
})
|
||||||
|
console.log(redirectUrlObj)
|
||||||
if (redirectUrl) {
|
if (redirectUrlObj) {
|
||||||
return NextResponse.redirect(redirectUrl, {
|
return NextResponse.redirect(redirectUrlObj.redirect, {
|
||||||
headers: redirectHeaders,
|
headers: redirectHeaders,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user