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,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user