Skip to content

Commit

Permalink
Revert "refactor: 서버 주소 변경 (#284)"
Browse files Browse the repository at this point in the history
This reverts commit e70e11f.
  • Loading branch information
jiwonh423 authored Aug 14, 2023
1 parent e70e11f commit 6a358c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/AskLoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Space from '../components/common/Space';

export default function AskLoginPage() {
const loginButtonClick = () => {
window.location.href = 'http://mapbefine.kro.kr/api/oauth/kakao';
window.location.href = 'http://localhost:8080/oauth/kakao';
};

return (
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/KaKaoRedirectPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import { LoginResponse } from '../types/Login';
export const handleOAuthKakao = async (code: string) => {
const { routePage } = useNavigator();
try {
const url = `http://mapbefine.kro.kr/api/oauth/login/kakao?code=${code}`;
const url = `http://localhost:8080/oauth/login/kakao?code=${code}`;
const data = await getApi<LoginResponse>('login', url);

// localStorage에 data.accessToken과 data.member 저장
localStorage.setItem('userToken', data.accessToken);
localStorage.setItem('user', JSON.stringify(data.member));

window.alert('login process');
routePage('/');
} catch (error) {
window.alert('로그인 실패');
Expand Down

0 comments on commit 6a358c8

Please sign in to comment.