diff --git a/src/app/(auth)/_components/simple-signUpIn.tsx b/src/app/(auth)/_components/simple-signUpIn.tsx
index 73c0c812..3e376fd9 100644
--- a/src/app/(auth)/_components/simple-signUpIn.tsx
+++ b/src/app/(auth)/_components/simple-signUpIn.tsx
@@ -1,12 +1,14 @@
import { Button, Icon } from "@/components";
+import randomStringGenerator from "@/utils/random-string-generator";
import React from "react";
const SimpleSignUpIn = () => {
- const client_id = process.env.NEXT_PUBLIC_KAKAO_REST_API_KEY;
- const redirect_uri = process.env.NEXT_PUBLIC_REDIRECT_URI;
- const kakaoUrl = `https://kauth.kakao.com/oauth/authorize?client_id=${client_id}&redirect_uri=${redirect_uri}&response_type=code`;
-
const handleKakaoSignin = () => {
+ const state = randomStringGenerator(10);
+ const kakao_client_id = process.env.NEXT_PUBLIC_KAKAO_REST_API_KEY;
+ const kakao_redirect_uri = process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI;
+ const kakaoUrl = `https://kauth.kakao.com/oauth/authorize?client_id=${kakao_client_id}&redirect_uri=${kakao_redirect_uri}&response_type=code&state=${state}`;
+
window.location.href = kakaoUrl;
};
@@ -17,18 +19,18 @@ const SimpleSignUpIn = () => {
OR
카카오 로그인 중...
;
+ return (
+
+
: "등록하기"}
*
*/
-const LoadingSpinner = ({ ariaLabel = "로딩 중" }: LoadingSpinnerProps) => {
+const LoadingSpinner = ({
+ ariaLabel = "로딩 중",
+ className,
+}: LoadingSpinnerProps) => {
return (
);
diff --git a/src/utils/axios.ts b/src/utils/axios.ts
index 18f1a1f5..dc08cfc4 100644
--- a/src/utils/axios.ts
+++ b/src/utils/axios.ts
@@ -54,7 +54,13 @@ instance.interceptors.request.use(
const url = config.url ?? "";
const method = config.method?.toLocaleLowerCase();
- const noTokenURls = ["/", "/signin", "/signup", "/auth/refresh-token"];
+ const noTokenURls = [
+ "/",
+ "/signin",
+ "/signup",
+ "/auth/refresh-token",
+ "/auth/signIn/KAKAO",
+ ];
if (noTokenURls.includes(url)) {
return config;
}
diff --git a/src/utils/cookie-utils.ts b/src/utils/cookie-utils.ts
index a5b01cbe..c06237a4 100644
--- a/src/utils/cookie-utils.ts
+++ b/src/utils/cookie-utils.ts
@@ -18,13 +18,3 @@ export const deleteCookie = (cookieName: string) => {
document.cookie = `${cookieName}=; path=/; max-age=0; ${secureFlag}`;
document.cookie = `${cookieName}=; max-age=0; ${secureFlag}`;
};
-
-export const setCookie = (name: string, value: string) => {
- const secureFlag = process.env.NODE_ENV === "production" ? "secure" : "";
- let cookieString = `${name}=${value}; path=/`;
-
- if (process.env.NODE_ENV === "production") {
- cookieString += `; ${secureFlag}`;
- }
- document.cookie = cookieString;
-};
diff --git a/tailwind.config.ts b/tailwind.config.ts
index fdc84ec4..028de632 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -48,6 +48,7 @@ const config: Config = {
yellow: "#EAB308",
cyan: "#06B6D4",
purple: "#A855F7",
+ kakao: "#F5E14B",
},
screens: {
mobile: "375px",