From 31749ad31abf3f18b3453870488bce3f38463160 Mon Sep 17 00:00:00 2001 From: sayyyho <323psh@naver.com> Date: Tue, 10 Sep 2024 13:33:56 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EC=B9=B4=EC=B9=B4=EC=98=A4=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/LoginPage.jsx | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/pages/LoginPage.jsx b/src/pages/LoginPage.jsx index 308dac8..27cee6f 100644 --- a/src/pages/LoginPage.jsx +++ b/src/pages/LoginPage.jsx @@ -1,27 +1,31 @@ import React from "react"; - +import { Link } from "react-router-dom"; function LoginPage() { - const handleLogin = async () => { - try { - console.log("Attempting to redirect to OAuth provider..."); - - // Redirection URL 로그 추가 - // const redirectUrl = `https://kauth.kakao.com/oauth/authorize?client_id=${kakaoClientId}&redirect_uri=${redirectUri}&response_type=code`; - const redirectUrl = `https://api.kaboo.site:8081/oauth2/authorization/kakao?client_id=${import.meta.env.VITE_KAKAO_CLIENT_ID}&redirect_uri=${import.meta.env.VITE_KAKAO_REDIRECT_URI}&response_type=code`; - console.log("Redirect URL:", redirectUrl); - - window.location.href = redirectUrl; + // const handleLogin = async () => { + // try { - console.log(res); - } catch (error) { - console.error("Error during redirection:", error); - } - }; + // // Redirection URL 로그 추가 + // // const redirectUrl = `https://kauth.kakao.com/oauth/authorize?client_id=${kakaoClientId}&redirect_uri=${redirectUri}&response_type=code`; + // // const redirectUrl = `https://api.kaboo.site:8081/oauth2/authorization/kakao?client_id=${import.meta.env.VITE_KAKAO_CLIENT_ID}&redirect_uri=${import.meta.env.VITE_KAKAO_REDIRECT_URI}&response_type=code`; + // } catch (error) { + // console.error("Error during redirection:", error); + // } + // }; return (