-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix]: 서버 로그인 로직 변경에 따른 AccessToken, RefeshToken 쿠키 세팅 제거 및 landingSt…
…atus 제거 (#87) * fix: 논리 테스트 * fix: sentry 논리판단 되돌리기 * chore: console 테스트 * fix: cookie base-url 상위 도메인으로 변경 * fix: landingStatus 로직 제거 * fix: 메인화면 지원하기 버튼 dashboard로 라우트 * fix:landingStatus 삭제 및 쿠키로직 수정 * fix: landingStatus 관련된 모든 로직 제거 * fix: 쿠키 판단 로직 재건 * fix: 필요없는 guard 모두 삭제 * fix: 리다이렉트 정리 * fix: 로그인 유지 시간 sessionStorage에서 확인 * fix: 쿠키 관련 도메인 로직 모두 삭제 * fix: Cookie 관련 모든 로직 삭제 * fix: 빌드에러 터지는거 해결 * fix: 서버에서 refresh갱신 실패할때 로그아웃 처리 * fix: 403 에러 왔을때 세션 만료 * fix: 모집 기간 마감 예외처리 * fix: 파일 확장명 변경
- Loading branch information
Showing
28 changed files
with
71 additions
and
519 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
import useLandingStatus from '@/hooks/zustand/useLandingStatus'; | ||
import { useEffect } from 'react'; | ||
import { Outlet } from 'react-router-dom'; | ||
import RoutePath from '@/routes/routePath'; | ||
import { isAuthenticated } from '@/utils/auth'; | ||
import { toast } from 'react-toastify'; | ||
import { useNavigate, Outlet } from 'react-router-dom'; | ||
import { useEffect, useState } from 'react'; | ||
|
||
export default function AuthAccessGuard() { | ||
const { clearLandingStatus } = useLandingStatus(); | ||
const navigate = useNavigate(); | ||
const [redirect, setRedirect] = useState(false); | ||
|
||
useEffect(() => { | ||
clearLandingStatus(); | ||
if (!isAuthenticated()) { | ||
toast.error('로그인이 필요한 서비스예요.'); | ||
setRedirect(true); | ||
} | ||
}, []); | ||
|
||
return <Outlet />; | ||
useEffect(() => { | ||
if (redirect) { | ||
navigate(RoutePath.Home); | ||
} | ||
}, [redirect, navigate]); | ||
|
||
return isAuthenticated() ? <Outlet /> : null; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
src/components/auth/guard/OnboardingNotOpenedAccessGuard.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/components/auth/guard/StudentVerificationAccessGuard.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.