Merged in fix/use-image-component-for-dtmc-link-error (pull request #2515)
Use component image for dtmc error page bg * Use component image for dtmc error page bg Approved-by: Joakim Jäderberg Approved-by: Anton Gunnarsson Approved-by: Matilda Landström
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
import { NextResponse } from "next/server"
|
||||
import { type NextRequest, NextResponse } from "next/server"
|
||||
import { AuthError } from "next-auth"
|
||||
|
||||
import { logger } from "@scandic-hotels/common/logger"
|
||||
|
||||
import { dtmcApiCallback } from "@/constants/routes/dtmc"
|
||||
import { env } from "@/env/server"
|
||||
import { internalServerError, serviceUnavailable } from "@/server/errors/next"
|
||||
import { getPublicURL } from "@/server/utils"
|
||||
|
||||
import { signIn } from "@/auth.dtmc"
|
||||
|
||||
export async function GET() {
|
||||
export async function GET(request: NextRequest) {
|
||||
const publicURL = getPublicURL(request)
|
||||
try {
|
||||
const redirectUrl = await signIn(
|
||||
"microsoft-entra-id",
|
||||
{
|
||||
redirectTo: `${env.PUBLIC_URL}${dtmcApiCallback}`,
|
||||
redirectTo: `${publicURL}${dtmcApiCallback}`,
|
||||
redirect: false,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"use client"
|
||||
|
||||
import Image from "next/image"
|
||||
import { useSearchParams } from "next/navigation"
|
||||
import { type IntlShape, useIntl } from "react-intl"
|
||||
|
||||
@@ -12,6 +11,7 @@ import { supportEmail, supportPhone } from "@/constants/contactSupport"
|
||||
import { employeeBenefits } from "@/constants/routes/dtmc"
|
||||
|
||||
import ButtonLink from "@/components/ButtonLink"
|
||||
import Image from "@/components/Image"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import useLang from "@/hooks/useLang"
|
||||
import background from "@/public/_static/img/Scandic_Computer_Coffee.png"
|
||||
|
||||
Reference in New Issue
Block a user