Skip to content

Commit

Permalink
feat : logout 시 사용자 정보 삭제
Browse files Browse the repository at this point in the history
- 이전에는 logout시 accessToken만 삭제했음
- 현재 수정 내용을 통해 Logout시 localStorage에 저장되어 있던 사용자 정보를 삭제
  • Loading branch information
dongind committed Mar 27, 2024
1 parent 1a074f4 commit 69cb7aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions frontend/src/apis/api/loginAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import { useNavigate } from "react-router-dom";
import { authAPI, setAccessToken } from "../utils/authAPI";

export const getLoginURL = async () => {
const response = await baseAPI.get<GithubOauthUrlDTO>(
API_URL.GITHUB_OAUTH_URL
);
const response = await baseAPI.get<GithubOauthUrlDTO>(API_URL.GITHUB_OAUTH_URL);
return response.data.authUrl;
};

Expand Down Expand Up @@ -40,6 +38,7 @@ export const postLogout = async () => {

if (response.status === 200) {
setAccessToken(undefined);
window.localStorage.clear();
return response;
}
};

0 comments on commit 69cb7aa

Please sign in to comment.