fix: set correct response status if X-Auth-Return-Redirect (#8779)

Copy from https://github.com/nextauthjs/next-auth/pull/8775
This commit is contained in:
Thang Vu
2023-10-03 07:14:47 +07:00
committed by GitHub
parent a767456e36
commit 5133892784

View File

@@ -149,6 +149,7 @@ export async function Auth(
response.headers.delete("Location")
response.headers.set("Content-Type", "application/json")
return new Response(JSON.stringify({ url: redirect }), {
status: internalResponse.status,
headers: response.headers,
})
}