Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#269, #277, #302] ssr 제거 및 private 페이지 검증 수정 #322

Merged
merged 25 commits into from
Jun 17, 2024

Conversation

chanwoo00106
Copy link
Member

@chanwoo00106 chanwoo00106 commented Jun 9, 2024

💡 배경 및 개요

useLoggedIn을 사용해서 prviate 패이지를 관리하고 있었는데 이 로직이 react lifecycle를에서 실행되다보니 재실행이 되는 문제가 몇번 있었습니다
때문에 middleware로 이 문제를 해결했고 useLoggedIn을 제거하는 과정에서 ssr과 rtk-query, next rewrites 등을 추가적으로 제거했습니다

Resolves: #269, #277, #302

📃 작업내용

  • private 페이지 관리 수정
    • middleware 로 이전
  • useLoggedIn 제거
    • useLoggedIn을 제거했습니다
  • rtk-query 제거
  • ssr 제거
  • next rewrites를 /api/server로 이전

🎸 기타

  • nextjs의 rewrites를 제거하면서 서버와 통신하는 url을 변경했습니다

    • 앞으로 서버와 통신을 할때는 /api/server/... 으로 하면 될 것 같습니다
  • /register와 /register/teacher 페이지를 막지 못했습니다

    • 예를 들어 회원가입 후에 유저가 직접 /register에 접근을 할 수 있는 문제가 있습니다
    • 물론 학생이 /register/teacher에는 접근할 수 없습니다
    • 예상되는 큰 문제는 없지만 추후 백엔드와 논의후에 막아야할 것 같습니다

private 페이지 관리 수정
무한 스크롤 코드 수정
마이 페이지에 ssr을 제거했습니다
student 상세 페이지에 ssr 제거
useLoggedIn 의존성을 지우는 작업을 진행했습니다
useLoggedIn 훅을 제거하고 인증 로직을 개선했습니다
localStorage를 참조하는 코드를 제거했습니다
토큰 재발급 로직을 수정했습니다
rtk query를 전부 제거했습니다
nextjs의 rewrites 를 제거했습니다
빌드 에러를 해결했습니다
토큰 재발급에 실패할시 모든 cookie를 제거하는 로직을 추가했습니다
토큰 재발급 이후 refreshToken도 똑같이 데이터 수정 추가
@chanwoo00106 chanwoo00106 added 1️⃣ Priority: High 우선순위 - 상 ⚡️performance 성능 개선 🐞 Bug 버그 발생 labels Jun 9, 2024
@chanwoo00106 chanwoo00106 self-assigned this Jun 9, 2024
Copy link

vercel bot commented Jun 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sms ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 0:12am

@chanwoo00106 chanwoo00106 changed the title [#269, #277] ssr 제거 및 private 페이지 검증 수정 [#269, #277, #302] ssr 제거 및 private 페이지 검증 수정 Jun 9, 2024
This was linked to issues Jun 11, 2024
build 문제 해결
@chanwoo00106 chanwoo00106 removed a link to an issue Jun 17, 2024
@chanwoo00106 chanwoo00106 merged commit fd8d888 into develop Jun 17, 2024
4 checks passed
@chanwoo00106 chanwoo00106 deleted the feature/remove-ssr branch June 17, 2024 12:15
@chanwoo00106 chanwoo00106 mentioned this pull request Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1️⃣ Priority: High 우선순위 - 상 🐞 Bug 버그 발생 ⚡️performance 성능 개선
Projects
None yet
Development

Successfully merging this pull request may close these issues.

인가 로직 수정 토큰 재발급 문제
2 participants