From 20aa995c6bdf216b98554a515626f2776c62159c Mon Sep 17 00:00:00 2001 From: NamgungJongMin Date: Sun, 28 Jan 2024 17:48:44 +0900 Subject: [PATCH] Hotfix: fix kakao login --- src/api/auth.ts | 5 ----- src/pages/Auth/Login/Login.tsx | 25 +++++++------------------ 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/src/api/auth.ts b/src/api/auth.ts index fcf081c1..ed2d2b59 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -12,11 +12,6 @@ export const authRequest = { {withCredentials: true}, ), - login_kakao: () => - axios.get('https://api.tripvote.site/oauth2/authorization/kakao', { - withCredentials: true, - }), - logout: () => axios.post('/api/logout', {}, {withCredentials: true}), /* --------------------------------- SIGNUP FLOW --------------------------------- */ diff --git a/src/pages/Auth/Login/Login.tsx b/src/pages/Auth/Login/Login.tsx index e67d0ae8..821f14b4 100644 --- a/src/pages/Auth/Login/Login.tsx +++ b/src/pages/Auth/Login/Login.tsx @@ -1,4 +1,3 @@ -import axios from 'axios'; import {Link, useNavigate} from 'react-router-dom'; import styles from './Login.module.scss'; @@ -7,7 +6,6 @@ import {useGetMyInfo} from '@/hooks/User/useUser'; import LoginForm from '@/components/Auth/Login/LoginForm'; -import {authRequest} from '@/api/auth'; import KakaoIcon from '@/assets/kakao/kakao_path.svg?react'; import Logo from '@/assets/logo.svg?react'; @@ -22,17 +20,6 @@ function Login() { navigate('/'); } - const onClickKakao = async () => { - try { - const res = await authRequest.login_kakao(); - console.log('login_kakao response', res); - } catch (error) { - if (axios.isAxiosError(error)) { - console.log(error); - } - } - }; - return (

@@ -54,11 +41,13 @@ function Login() {

- + + +