-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 인증 인가 관련 토큰 로직 생성 #128
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
Conversation
- refreshToken 타입 삭제 - accessToken 재발급 타입 정의
- accessToken 저장 로직 - 로그인 시 캐시 정리/무효화 - accessToken 재발급 api 추가 - 로그인 api 에 accessToken 저장 추가 - 로그아웃 api에 accessToken 삭제 추가
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
🎨 Storybook Reportℹ️ Story 변경사항이 감지되지 않았습니다 이 PR에는 Story 변경이 없어서 빌드를 스킵했습니다.
|
📊 Coverage Report
📉 #128을 main에 병합하면 coverage가 Coverage 요약@@ Coverage Diff @@
## main #128 +/- ##
===========================================
- Coverage 28.16% 27.84% -0.32%
===========================================
Files 121 122 +1
Lines 4732 4788 +56
Branches 217 218 +1
===========================================
Hits 1333 1333 0
+ Misses 3399 3455 +56 영향받은 파일✅ 이 PR로 영향받은 파일이 없습니다 수정된 모든 파일이 현재 coverage를 유지했습니다. |
🚀 PR Preview Report✨ Build가 성공적으로 완료되었습니다. Preview에서 변경사항을 확인하세요.
|
Chiman2937
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!
| const result = await API.authService.login(payload); | ||
| console.log('login success:', result); | ||
|
|
||
| queryClient.invalidateQueries({ queryKey: userKeys.all }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로그인/회원가입은 직접 api 호출을 하고 있는 것 같은데, 맞다면 React Query를 사용하지 않는 거니까 해당 로직은 필요없어보입니다 :)
React Query를 사용하더라도 invalidateQueries의 용도는 useQuery 로 get한 데이터가 stale 됐다고 강제 변경한 뒤 데이터를 다시 refetch 해오는 용도로 쓰기 때문에 login에서는 필요 없을 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAccessToken과 clearAccessToken은 클라이언트에서만 사용되어야 하니까 서버 환경일 때는 error를 던져주면 디버깅에 용이할 것 같네요!
📝 변경 사항
💡src/types/service/auth.ts
💡src/lib/auth/token.ts
💡src/api/service/auth-service/index.ts
💡src/mock/service/auth/auth-utils.ts
💡src/mock/service/auth/auth-handlers.ts
💡src/components/pages/login/login-form/index.tsx
🔗 관련 이슈
Closes #114
🧪 테스트 방법
📸 스크린샷 (선택)
📋 체크리스트
💬 추가 코멘트
CodeRabbit Review는 자동으로 실행되지 않습니다.
Review를 실행하려면 comment에 아래와 같이 작성해주세요