Skip to content

develp branch 작업내용 머지 : develop -> main#137

Merged
heeeeyong merged 3 commits intomainfrom
develop
Aug 17, 2025
Merged

develp branch 작업내용 머지 : develop -> main#137
heeeeyong merged 3 commits intomainfrom
develop

Conversation

@heeeeyong
Copy link
Collaborator

@heeeeyong heeeeyong commented Aug 17, 2025

이하동일

Summary by CodeRabbit

  • 신규 기능
    • 없음
  • 버그 수정
    • 로그인 및 요청 인증의 안정성을 개선하여 쿠키 기반 토큰 자동 전송 신뢰도를 높였습니다.
    • 헤더에 토큰을 주입하던 방식으로 인한 간헐적 인증 실패를 해소했습니다.
  • 리팩터링
    • 요청 흐름을 쿠키 중심으로 단순화하고 불필요한 하드코딩 토큰을 제거했습니다.
    • 문제 진단을 돕는 조건부 로그를 추가했습니다.
  • 잡무(Chores)
    • OAuth 쿠키 설정을 위한 백엔드 경로를 정리하고 최신 경로로 업데이트했습니다.

@coderabbitai
Copy link

coderabbitai bot commented Aug 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

요청 인터셉터가 Authorization 헤더 조작을 중단하고, 쿠키의 access_token/temp_token 존재만 로깅하며 withCredentials로 자동 전송에 의존하도록 수정. OAuth 토큰 설정 호출 경로를 '/auth/set-cookie'에서 '/api/set-cookie'로 변경. 응답 인터셉터와 기타 로직은 유지.

Changes

Cohort / File(s) Summary
HTTP 클라이언트 인터셉터 조정
src/api/index.ts
요청 인터셉터에서 Authorization 헤더 주입 제거. 쿠키 temp_token/access_token을 조회해 상황별 로깅만 수행. withCredentials 유지, 헤더 미변경. 응답 인터셉터는 변경 없음.
OAuth 토큰 쿠키 설정 경로 변경
src/hooks/useOAuthToken.ts
토큰 쿠키 설정 API 경로를 '/auth/set-cookie' → '/api/set-cookie'로 변경. 페이로드와 옵션({ withCredentials: true }) 및 후속 처리 로직은 그대로.

Sequence Diagram(s)

sequenceDiagram
  participant U as User Agent (Browser)
  participant AX as Axios Client
  participant RI as Request Interceptor
  participant CJ as Cookies
  participant S as Server
  participant RSP as Response Interceptor

  U->>AX: API call
  AX->>RI: prepare request
  RI->>CJ: read access_token/temp_token
  RI-->>AX: no header mutation (withCredentials=true)
  AX->>S: request (cookies attached)
  S-->>AX: response
  AX->>RSP: handle response
  RSP-->>U: resolved data
Loading
sequenceDiagram
  participant C as Component
  participant H as useOAuthToken Hook
  participant AX as Axios POST /api/set-cookie
  participant S as Server
  participant CJ as Cookies

  C->>H: initiate token exchange (loginTokenKey)
  H->>AX: POST /api/set-cookie { loginTokenKey } (withCredentials)
  AX->>S: request
  S-->>AX: set-cookie response
  AX-->>H: success/failure
  S->>CJ: write cookies
  H-->>C: cleanup URL / handle result
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

🐞 BugFix

Poem

새벽의 코드밭, 귀 쫑긋 토끼 출근해
헤더 꾸러미 내려놓고, 쿠키 길만 따라가네 🍪
temp냐 access냐, 흔적만 살짝 기록하고
문은 '/api/set-cookie'로 살짝 옮겨 닫고
퐁당! 응답 물결 타고, 버그는 가볍게 점프! 🐇


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 79cd0c7 and eeac17c.

📒 Files selected for processing (2)
  • src/api/index.ts (1 hunks)
  • src/hooks/useOAuthToken.ts (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel
Copy link

vercel bot commented Aug 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
thip Ready Ready Preview Comment Aug 17, 2025 5:50am

@heeeeyong heeeeyong merged commit 2049b2d into main Aug 17, 2025
1 of 2 checks passed
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.

1 participant