From e7a6d281062af903d1a3af538d2c5b9fad5b98d1 Mon Sep 17 00:00:00 2001 From: "SK\\ssssk" Date: Wed, 10 Jul 2024 00:15:45 +0900 Subject: [PATCH] =?UTF-8?q?CSR=EC=97=90=EC=84=9C=20env=20=EA=B0=92?= =?UTF-8?q?=EC=9D=84=20=EC=9D=BD=EC=96=B4=EC=98=A4=EC=A7=80=20=EB=AA=BB?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EA=B2=83=EC=9C=BC=EB=A1=9C=20=EC=B6=94?= =?UTF-8?q?=EC=B8=A1=EB=90=98=EC=96=B4process.env.NEXT=5FPUBLIC=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/api/auth/kakao/route.ts | 2 +- src/containers/auth/AuthKaKaoContainer.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/api/auth/kakao/route.ts b/src/app/api/auth/kakao/route.ts index e51fa7d8..f07da979 100644 --- a/src/app/api/auth/kakao/route.ts +++ b/src/app/api/auth/kakao/route.ts @@ -1,6 +1,6 @@ import { NextResponse } from "next/server"; export function GET() { - const kakaoAuthUrl = `https://kauth.kakao.com/oauth/authorize?response_type=code&client_id=${process.env.NODE_ENV === "development" ? process.env.NEXT_PUBLIC_KAKAO_REST_API_KEY : process.env.KAKAO_REST_API_KEY}&redirect_uri=${process.env.NODE_ENV === "development" ? process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI : process.env.KAKAO_REDIRECT_URI}`; + const kakaoAuthUrl = `https://kauth.kakao.com/oauth/authorize?response_type=code&client_id=${process.env.NODE_ENV === "development" ? process.env.NEXT_PUBLIC_KAKAO_REST_API_KEY : process.env.KAKAO_REST_API_KEY}&redirect_uri=${process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI}`; return NextResponse.redirect(kakaoAuthUrl); } diff --git a/src/containers/auth/AuthKaKaoContainer.tsx b/src/containers/auth/AuthKaKaoContainer.tsx index 27d0aab4..e2bf16b4 100644 --- a/src/containers/auth/AuthKaKaoContainer.tsx +++ b/src/containers/auth/AuthKaKaoContainer.tsx @@ -17,7 +17,7 @@ const AuthKaKaoContainer = () => { const kakaoLogin = async () => { try { const response = await fetch( - `${process.env.NODE_ENV === "development" ? process.env.NEXT_PUBLIC_BACKEND_URL : process.env.BACKEND_URL}/api/auth/oauth2/login?type=kakao&redirectUrl=${process.env.NODE_ENV === "development" ? process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI : process.env.KAKAO_REDIRECT_URI}&code=${_queryStringObject?.code}`, + `${process.env.NEXT_PUBLIC_BACKEND_URL}/api/auth/oauth2/login?type=kakao&redirectUrl=${process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI}&code=${_queryStringObject?.code}`, { method: "GET", headers: {