Skip to content

[FIX] 인증 쿠키 프록시 전달 수정 - #40

Merged
hdg0116 merged 1 commit into
developfrom
fix/39-auth-cookie-proxy
Sep 9, 2026
Merged

hdg0116 merged 1 commit into
developfrom
fix/39-auth-cookie-proxy

Conversation

@hdg0116

@hdg0116 hdg0116 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

ISSUE

close #39



What is this PR?

  • 로그인 후 매장 목록 조회 시 백엔드에서 JWT를 입력해주세요. 에러가 반환되던 문제를 수정했습니다.
  • 백엔드가 Authorization 헤더가 아니라 accessToken / refreshToken 쿠키를 인증값으로 사용하므로, 서버 프록시 요청에서 백엔드용 Cookie 헤더를 전달하도록 변경했습니다.
  • AccessToken 재발급 요청은 refreshToken 쿠키명으로 전달되도록 분기했습니다.



Screenshot

N/A



Test Checklist

  • pnpm lint
  • pnpm build
  • 로컬 로그인 후 GET /api/stores?page=1&size=10 200 응답 확인

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
room-in-us-front-admin Ready Ready Preview Sep 9, 2026 5:05am UTC

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 7afc5fb1-df8f-49a6-bd4c-fcd299995f3c

📥 Commits

Reviewing files that changed from the base of the PR and between 633eb77 and 70ab7fe.

📒 Files selected for processing (2)
  • src/app/api/auth/access-token/route.ts
  • src/shared/api/server-client.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Summary

Summary by CodeRabbit

  • 개선 사항
    • 인증 요청에서 액세스 토큰과 리프레시 토큰을 각각 지정된 쿠키를 통해 처리하도록 개선했습니다.
    • 기존 액세스 토큰 기반 인증 동작은 유지됩니다.

Walkthrough

서버 API 클라이언트에 인증 쿠키 이름 선택 옵션을 추가했습니다. 기본값은 accessToken입니다. Access token 재발급 경로는 refreshToken 쿠키를 사용하도록 변경했습니다.

Changes

인증 쿠키 전달

Layer / File(s) Summary
서버 API 클라이언트의 인증 쿠키 처리
src/shared/api/server-client.ts
authCookieName 옵션과 accessToken 기본값을 추가했습니다. 지정된 인증 토큰을 Cookie 헤더로 전달합니다.
토큰 재발급 경로 연결
src/app/api/auth/access-token/route.ts
createServerApi 호출에서 authCookieName: 'refreshToken'을 지정합니다.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 70ab7

Server proxy requests now forward the access token cookie, while token renewal uses the refresh token cookie, restoring authenticated store-list requests and preserving the intended renewal flow.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 요구된 [PREFIX] 형식을 따릅니다. [FIX] 인증 쿠키 프록시 전달 수정은 인증 쿠키를 프록시 요청에 전달하는 주요 변경을 정확히 설명합니다.
Description check ✅ Passed 이슈 번호, 변경 내용, 스크린샷 상태, 테스트 체크리스트를 모두 포함합니다. 변경 목적과 검증 결과도 PR 목표와 일치합니다.
  • Fix all pre-merge checks with AI

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.

@hdg0116

hdg0116 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@hdg0116
hdg0116 merged commit e44e0ad into develop Sep 9, 2026
6 checks passed
@hdg0116
hdg0116 deleted the fix/39-auth-cookie-proxy branch September 9, 2026 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 매장 목록 조회 시 백엔드 인증 쿠키 전달 누락 수정

1 participant