chore(debug): next-auth url
This commit is contained in:
@@ -1,2 +1,19 @@
|
|||||||
export { GET, POST } from "@/auth"
|
import { GET as _GET, POST as _POST } from "@/auth"
|
||||||
|
|
||||||
|
import type { NextRequest } from "next/server"
|
||||||
|
|
||||||
export const runtime = "edge"
|
export const runtime = "edge"
|
||||||
|
|
||||||
|
export async function GET(req: NextRequest) {
|
||||||
|
console.log({ GET_REQ: req })
|
||||||
|
console.log({ GET_AUTH_URL: process.env.AUTH_URL })
|
||||||
|
console.log({ GET_NEXTAUTH_URL: process.env.NEXTAUTH_URL })
|
||||||
|
return _GET(req)
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function POST(req: NextRequest) {
|
||||||
|
console.log({ POST_REQ: req })
|
||||||
|
console.log({ POST_AUTH_URL: process.env.AUTH_URL })
|
||||||
|
console.log({ POST_NEXTAUTH_URL: process.env.NEXTAUTH_URL })
|
||||||
|
return _POST(req)
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ jiti("./env/client")
|
|||||||
// Otherwise we fallback to DEPLOY_PRIME_URL from Netlify built-in variables.
|
// Otherwise we fallback to DEPLOY_PRIME_URL from Netlify built-in variables.
|
||||||
// Locally we set DEPLOY_PRIME_URL
|
// Locally we set DEPLOY_PRIME_URL
|
||||||
const ENV_URL = process.env.SCANDIC_ENV_URL || process.env.DEPLOY_PRIME_URL
|
const ENV_URL = process.env.SCANDIC_ENV_URL || process.env.DEPLOY_PRIME_URL
|
||||||
|
console.log({ config_SCANDIC_ENV_URL: process.env.SCANDIC_ENV_URL })
|
||||||
|
console.log({ config_DEPLOY_PRIME_URL: process.env.DEPLOY_PRIME_URL })
|
||||||
|
console.log({ ENV_URL })
|
||||||
|
|
||||||
// We set NEXTAUTH_URL here because next.config.js is included in Netlify
|
// We set NEXTAUTH_URL here because next.config.js is included in Netlify
|
||||||
// functions when bundling. Otherwise we are unable to login on preview
|
// functions when bundling. Otherwise we are unable to login on preview
|
||||||
|
|||||||
Reference in New Issue
Block a user