Feat/SW-3461 setup auth with sas eurobonus * feat(SW-3461): Setup auth for sas eurobonus * . * feat: setup auth towards SAS * Fix auth via SAS and add logout route * . * merge * auth via SAS * fix powered by scandic logo * Merge branch 'master' of bitbucket.org:scandic-swap/web into feat/SW-3461-setup-auth-with-sas-eurobonus * Include access_token in jwt after successful login * merge Approved-by: Anton Gunnarsson
18 lines
435 B
TypeScript
18 lines
435 B
TypeScript
import { type NextRequest } from "next/server"
|
|
|
|
import { getPublicURL } from "@/server/utils"
|
|
|
|
import { signOut } from "@/auth"
|
|
|
|
import type { Lang } from "@scandic-hotels/common/constants/language"
|
|
|
|
export async function GET(
|
|
request: NextRequest,
|
|
_context: { params: Promise<{ lang: Lang }> }
|
|
) {
|
|
const publicURL = getPublicURL(request)
|
|
|
|
const redirectTo: string = publicURL
|
|
await signOut({ redirectTo, redirect: true })
|
|
}
|