Skip to content

[FIX] Auth BFF 리뷰 반영 - #25

Merged
hdg0116 merged 2 commits into
developfrom
feature/23-auth-bff-route-handlers
Aug 27, 2026
Merged

hdg0116 merged 2 commits into
developfrom
feature/23-auth-bff-route-handlers

Conversation

@hdg0116

@hdg0116 hdg0116 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

ISSUE 📌

refs #23



What is this PR? 📝

  • POST /api/auth/login 요청 body 처리를 보완했습니다.
    • request.json() 결과를 unknown으로 파싱
    • malformed JSON 요청은 400 반환
    • id, password가 string이 아닌 요청은 400 반환
    • 유효한 요청과 서버 API 실패에 대한 기존 에러 처리 흐름은 유지
  • 인증 API 호출에서 redirect를 차단했습니다.
    • /auth/login 요청에 maxRedirects: 0 적용
    • /auth/access-token 요청에 maxRedirects: 0 적용
    • redirect origin으로 credential/token이 전달되지 않도록 보완



Screenshot 🖼️

N/A

  • Auth BFF Route Handler 보안/검증 보완 작업으로 별도 화면 변경은 없습니다.



Test Checklist ✅

  • pnpm format:check
  • pnpm lint
  • pnpm build

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
room-in-us-front-admin Ready Ready Preview Aug 27, 2026 5:11pm

@github-actions github-actions Bot added the 🐞 BugFix 버그 수정 label Aug 27, 2026
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Review 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: Pro Plus

Run ID: a88a44c0-ae05-43a6-a184-c427aa8a76a6

📥 Commits

Reviewing files that changed from the base of the PR and between f40574e and 14a7850.

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

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


📝 Walkthrough

Summary by CodeRabbit

  • 버그 수정
    • 로그인 요청 본문이 올바른 JSON 형식인지 검증하도록 개선했습니다.
    • 필수 입력값인 아이디와 비밀번호가 올바른 형식이 아닐 경우 명확한 오류 응답을 제공합니다.
    • 잘못된 요청으로 인해 인증 API가 불필요하게 호출되는 문제를 방지했습니다.
    • 인증 토큰 갱신 및 로그인 과정에서 예기치 않은 리디렉션을 방지해 요청 결과를 안정적으로 처리합니다.

Walkthrough

로그인 API가 JSON 본문을 파싱하고 id, password 문자열 여부를 검증합니다. 잘못된 요청은 400 응답을 받습니다. 로그인 및 액세스 토큰 갱신 요청은 리디렉션을 따르지 않습니다.

Changes

인증 요청 처리

Layer / File(s) Summary
로그인 본문 검증
src/app/api/auth/login/route.ts
POST /api/auth/login이 JSON 파싱 오류와 잘못된 id 또는 password 형식을 400 응답으로 처리합니다.
인증 API 리디렉션 제어
src/app/api/auth/login/route.ts, src/app/api/auth/access-token/route.ts
로그인 및 액세스 토큰 갱신 API 호출에 maxRedirects: 0을 설정합니다.

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

Merge Risk: ⚪ Minimal · up to 14a78

The PR adds request validation and prevents authentication requests from following redirects without changing the established success and error flows. No actionable merge-blocking risk remains after normal checks and review.

🚥 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 2 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 제목이 [FIX] prefix 규칙을 따릅니다. Auth BFF의 요청 검증과 redirect 차단 변경을 설명하므로 변경 사항과 관련됩니다.
Description check ✅ Passed 이슈, 변경 내용, Screenshot, Test Checklist 섹션을 모두 포함합니다. 변경 내용과 테스트 결과도 구체적으로 작성되어 템플릿 요구사항을 충족합니다.
  • 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 merged commit c92b115 into develop Aug 27, 2026
6 checks passed
@hdg0116
hdg0116 deleted the feature/23-auth-bff-route-handlers branch August 27, 2026 17:19
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.

1 participant