Skip to content

Conversation

@Chiman2937
Copy link
Member

@Chiman2937 Chiman2937 commented Dec 29, 2025

📝 변경 사항

❓ 기존 버그

accessToken이 만료되어 cookie가 삭제된 후 SSE 연결 해제, unReadCount 초기화가 정상적으로 동작하지 않음

💡 해결

  • accessToken state와 cookie의 실시간 동기화 구현 복잡성을 고려하여 accessToken state를 삭제하고 isAuthenticated로 변경하였습니다.

  • 아래 Case에 대해 검증을 완료하였습니다.

0. 페이지 접속 시(혹은 새로고침)

  • accessToken이 없다면 isAuthenticated가 false로 설정된다.
  • refreshToken이 있다면 refresh를 시도한다.
    • refresh에 성공했다면 isAuthenticated가 true로 설정된다.

1. 로그인 시

  • isAuthenticated가 true로 설정된다.
  • UnReadCount를 불러온다.
  • SSE에 연결된다.

2. 로그아웃 시

  • isAuthenticated가 false로 설정된다.
  • UnReadCount가 0으로 설정된다.
  • SSE 연결이 해제된다.

3. accessToken이 없을 시

  • api가 호출될 때 refresh를 시도한다.(SSE 제외)

3-1. refresh에 성공했을 시

  • isAuthenticated가 true로 유지된다.
  • SSE 연결이 유지된다.

3-2. refresh에 실패했을 시

  • isAuthenticated가 false로 설정된다.
  • SSE 연결이 해제된다.

🔗 관련 이슈

Closes #


🧪 테스트 방법

  • 수동 테스트 검증(로컬 환경)
  • 유닛 테스트 검증
  • 통합 테스트 검증

📸 스크린샷 (선택)


📋 체크리스트

  • 관련 문서를 업데이트했습니다 (필요한 경우)
  • 테스트를 추가/수정했습니다 (필요한 경우)
  • Breaking change가 있다면 명시했습니다

💬 추가 코멘트


CodeRabbit Review는 자동으로 실행되지 않습니다.

Review를 실행하려면 comment에 아래와 같이 작성해주세요

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chiyoung-fix/auth-provider

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

🎭 Playwright Report

E2E Test가 성공적으로 완료되었습니다.

Test 요약 내용을 확인해주세요.

Status Build Log Updated (UTC)
✅ Ready View Build 2025-12-29 13:20:09

📊 Test Summary

  • ✅ Passed: 3
  • ❌ Failed: 0
  • ⏱️ Duration: 36.7s

📜 Test Details

✅ Passed Tests (3)
  • profile.test.ts (3)
    • [chromium] 존재하지 않는 프로필 페이지로 접속 시 404 redirect 되는 지 테스트
    • [firefox] 존재하지 않는 프로필 페이지로 접속 시 404 redirect 되는 지 테스트
    • [webkit] 존재하지 않는 프로필 페이지로 접속 시 404 redirect 되는 지 테스트

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

📊 Coverage Report

Status Build Log Updated (UTC)
✅ Ready View Build 2025-12-29 13:18:58

📈 #276main에 병합하면 coverage가 0.46% 증가합니다.

Coverage 요약

@@             Coverage Diff             @@
##             main     #276       +/-   ##
===========================================
+ Coverage   42.21%   42.67%    +0.46%     
===========================================
  Files         195      195         0     
  Lines        8634     8642        +8     
  Branches      392      403       +11     
===========================================
+ Hits         3645     3688       +43     
- Misses       4989     4954       -35     

영향받은 파일

파일 Coverage 변화
/home/runner/work/WeGo_FrontEnd/WeGo_FrontEnd/src/api/core/index.ts 63.79% (+9.95%) ⬆️
/home/runner/work/WeGo_FrontEnd/WeGo_FrontEnd/src/api/service/auth-service/index.ts 78.26% (+8.70%) ⬆️
/home/runner/work/WeGo_FrontEnd/WeGo_FrontEnd/src/api/service/notification-service/index.ts 54.54% (+8.39%) ⬆️
/home/runner/work/WeGo_FrontEnd/WeGo_FrontEnd/src/hooks/use-notification/use-notification-connect-sse/index.ts 11.25% (+1.00%) ⬆️
/home/runner/work/WeGo_FrontEnd/WeGo_FrontEnd/src/hooks/use-notification/use-notification-get-unread-count/index.ts 30.43% (-2.90%) ⬇️
/home/runner/work/WeGo_FrontEnd/WeGo_FrontEnd/src/mock/service/auth/auth-handlers.ts 45.37% (+11.12%) ⬆️
/home/runner/work/WeGo_FrontEnd/WeGo_FrontEnd/src/mock/service/common/common-mock.ts 100.00% (+42.31%) ⬆️
/home/runner/work/WeGo_FrontEnd/WeGo_FrontEnd/src/providers/provider-auth/index.tsx 94.11% (-1.54%) ⬇️

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

🎨 Storybook Report

변경 사항이 없습니다

모든 Story가 이전 빌드와 동일합니다.

Status Storybook Build Log Updated (UTC)
✅ Unchanged View Storybook View Build 2025-12-29 13:20:18

@github-actions
Copy link

github-actions bot commented Dec 29, 2025

🚀 PR Preview Report

Build가 성공적으로 완료되었습니다.

Preview에서 변경사항을 확인하세요.

Status Preview Build Log Updated (UTC)
✅ Ready Visit Preview View Logs 2025-12-29 13:20:00

@Chiman2937 Chiman2937 added the Ready For Review! 리뷰 받을 준비가 되었습니다. label Dec 29, 2025
@Chiman2937 Chiman2937 changed the title [fix] AuthProvider 버그 수정 [Fix] AuthProvider 버그 수정 Dec 29, 2025
@Chiman2937 Chiman2937 merged commit bed6cce into main Dec 30, 2025
10 checks passed
@Chiman2937 Chiman2937 deleted the chiyoung-fix/auth-provider branch December 30, 2025 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready For Review! 리뷰 받을 준비가 되었습니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants