From ac774862132848afbf4f71fbe6c658a3cf57f1a7 Mon Sep 17 00:00:00 2001 From: a-honey Date: Fri, 1 Mar 2024 14:33:12 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EC=B9=B4=EC=B9=B4=EC=98=A4=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EB=8F=84=EB=A9=94=EC=9D=B8=20status=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/queries/login/useGetKakaoToken.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/queries/login/useGetKakaoToken.ts b/src/hooks/queries/login/useGetKakaoToken.ts index a3e3e7a..214d19d 100644 --- a/src/hooks/queries/login/useGetKakaoToken.ts +++ b/src/hooks/queries/login/useGetKakaoToken.ts @@ -4,12 +4,13 @@ import { useRouter } from 'next/router'; const useGetKakaoToken = (code: string | null = '') => { const router = useRouter(); + const status = window.location.href.split('//')[1].split('/')[0] === 'localhost:3000' ? 'dev' : 'prod'; const { data } = useBaseQuery<{ accessToken: string; refreshToken: string; kakaoId: number; kakaoEmail: string; - }>(queryKeys.KAKAO(), `/users/kakao-login?code=${code}`, true); + }>(queryKeys.KAKAO(), `/users/kakao-login?code=${code}&status=${status}`, true); if (data?.data?.accessToken === undefined) { void router.push(`/mypage/profile?kakaoId=${data?.data?.kakaoId}&kakaoEmail=${data?.data?.kakaoEmail}`); From b97bbd0f9ffe7fac4bbd37d39bf79899e0f5b9ec Mon Sep 17 00:00:00 2001 From: a-honey Date: Fri, 1 Mar 2024 14:34:06 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C?= =?UTF-8?q?=EC=9A=B0=20BASE=5FURL=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 599122f..cd339a2 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -32,6 +32,7 @@ jobs: # 환경 변수 추가 - name: Set Environment Variables run: | + echo "NEXT_PUBLIC_BASE_URI=${{ secrets.NEXT_PUBLIC_BASE_URI }}" >> .env echo "NEXT_PUBLIC_KAKAO_API_KEY=${{ secrets.NEXT_PUBLIC_KAKAO_API_KEY }}" >> .env echo "NEXT_PUBLIC_KAKAO_REDIRECT_URI=${{ secrets.NEXT_PUBLIC_KAKAO_REDIRECT_URI }}" >> .env echo "NEXT_PUBLIC_GOOGLE_API_KEY=${{ secrets.NEXT_PUBLIC_GOOGLE_API_KEY }}" >> .env