Skip to content

[FEAT] 사회자 채널 구독 시 사회자 토큰 첨부 - #499

Merged
coli-geonwoo merged 1 commit into
developfrom
feat/#498-chairman-subscribe-auth
Sep 24, 2026
Merged

coli-geonwoo merged 1 commit into
developfrom
feat/#498-chairman-subscribe-auth

Conversation

@coli-geonwoo

Copy link
Copy Markdown
Contributor

🚩 연관 이슈

closed #498

📝 작업 내용

BE PR(debate-timer/debate-timer-be#268)의 CodeRabbit 보안 리뷰 반영에 맞춘 FE 변경입니다.
BE는 이제 /chairman/{roomId} 구독을 유효한 사회자 토큰을 가진 테이블 소유자에게만 허용합니다.
(인증 없는 구독으로 활성 사회자를 빼앗아 라이브 공유를 중단시킬 수 있던 문제)

  • 사회자 채널 구독 헤더에 Authorization(사회자 토큰) 첨부
    • useChairmanSocket에 getAuthToken 옵션 추가, 재연결 후 재구독할 때마다 호출해 갱신된 토큰 사용
    • useLiveShare에서 최신 사회자 토큰을 넘김
  • 연결 직후 현재 상태 공유(SYNC)를 채널 재구독 이후로 미룸
    • BE에서 발행으로는 활성 사회자가 될 수 없게 바뀌어, 구독보다 SYNC가 먼저 도착하면 첫 상태가 버려지기 때문

테스트

  • 구독 헤더의 토큰 첨부·갱신, 토큰 없을 때 미첨부, SYNC 지연 테스트 추가 (전체 468개 통과)

🏞️ 스크린샷 (선택)

🗣️ 리뷰 요구사항 (선택)

🤖 Generated with Claude Code

- 사회자 채널 구독 헤더에 Authorization(사회자 토큰)을 첨부하고, 재구독 시 갱신된 토큰을 사용
- 연결 직후 현재 상태 공유를 채널 재구독 이후로 미뤄 활성 사회자 등록이 먼저 처리되도록 함

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coli-geonwoo coli-geonwoo self-assigned this Sep 24, 2026
@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3a9fb461-dcb9-4b37-9e71-924a5a2bd287

📥 Commits

Reviewing files that changed from the base of the PR and between 7338756 and 81fcc1a.

📒 Files selected for processing (3)
  • src/hooks/sockets/useChairmanSocket.test.ts
  • src/hooks/sockets/useChairmanSocket.ts
  • src/page/TimerPage/hooks/useLiveShare.ts

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.

@github-actions

Copy link
Copy Markdown

🚀 Preview 배포 완료!

환경 URL
Preview 열기
API Dev 환경

PR이 닫히면 자동으로 정리됩니다.

@coli-geonwoo
coli-geonwoo merged commit 85d14d3 into develop Sep 24, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown

🧹 Preview 배포가 정리되었습니다.

This branch was successfully deployed

2 active deployments
DEPLOY_DEV — 81fcc1a2 Deployed Sep 24, 2026 by coli-geonwoo via build-and-deploy #183
PREVIEW_ENV — 81fcc1a2 Deployed Sep 24, 2026 by coli-geonwoo via cleanup #31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 사회자 채널 구독 시 사회자 토큰 첨부

1 participant