Nextjs 로그아웃 연동 : feat : 에러코드 업데이트 & route.ts 내부 로컬 쿠키 분기 시 res 반환 ht…#15
Nextjs 로그아웃 연동 : feat : 에러코드 업데이트 & route.ts 내부 로컬 쿠키 분기 시 res 반환 ht…#15
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough로그인 POST 핸들러의 localhost 분기에서 로컬 응답을 즉시 반환하도록 수정되었습니다. 비-localhost 경로는 기존 흐름을 유지합니다. 또한 에러 코드 모듈에 네트워크/타임아웃/업스트림/알 수 없음 관련 코드가 추가되고, 로그인 실패 메시지가 변경되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant R as Login API (route.ts)
participant U as Upstream Auth
Note over R: POST /api/login
alt isLocalhost()
rect rgba(200,240,255,0.2)
C->>R: Credentials
R->>U: Forward login (optional in dev)
U-->>R: { ok, data } / error
R->>C: Return local NextResponse<br/>(sets accessToken cookie if present)
Note right of R: 변경점: localhost에서 즉시 반환
end
else non-localhost
C->>R: Credentials
R->>U: Forward login
U-->>R: { ok, data } / error
R-->>C: Upstream 기반 응답 반환
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
…tps://github.com//issues/6
Summary by CodeRabbit