diff --git a/ops/staging-deploy.tmpl.yaml b/ops/staging-deploy.tmpl.yaml index 6090175..02e64a3 100644 --- a/ops/staging-deploy.tmpl.yaml +++ b/ops/staging-deploy.tmpl.yaml @@ -1,5 +1,5 @@ appBaseUrl: 'https://phenovista-staging.softserv.cloud' -clientBaseUrl: '' +clientBaseUrl: 'https://phenovista-test.vercel.app' clientId: $CLIENT_ID clientSecret: $CLIENT_SECRET googleTagManagerId: '' diff --git a/pages/api/auth/[...nextauth].js b/pages/api/auth/[...nextauth].js index 282608c..d6bb92d 100644 --- a/pages/api/auth/[...nextauth].js +++ b/pages/api/auth/[...nextauth].js @@ -47,15 +47,15 @@ const authOptions = { * and what it expected. * ref: https://github.com/nextauthjs/next-auth/discussions/7491#discussioncomment-6166539 */ - const clientUrl = process.env.NEXT_PUBLIC_CLIENT_BASE_URL - const urlPathname = new URL(url).pathname + const clientUrl = process.env.NEXT_PUBLIC_CLIENT_BASE_URL + const urlPathname = new URL(url).pathname console.log({ url, baseUrl, clientUrl, urlPathname, }) - if (new URL(url).origin === process.env.NEXT_PUBLIC_CLIENT_BASE_URL) return `${clientUrl}${urlPathname}` + // if (new URL(url).origin === process.env.NEXT_PUBLIC_CLIENT_BASE_URL) return `${clientUrl}${urlPathname}` // return baseUrl - return url + return `${clientUrl}${urlPathname}` /** * {