Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough서버 로그아웃 엔드포인트( Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/app/api/member/logout/route.ts`:
- Line 20: The route currently always returns NextResponse.json({ success: true
}) which hides server-side logout failures; wrap the server-side
logout/token/session revocation logic in a try/catch inside the handler in
src/app/api/member/logout/route.ts (the function handling the request/response),
and on success return the existing success response but on failure return a
non-200 response (e.g., NextResponse.json({ success: false, error: "<message>"
}, { status: 500 })) so callers can detect server-side failures; keep
client-side cookie cleanup (useLogout onError) as-is so local logout still
occurs while surfacing server errors.
- Around line 22-29: The logout route currently hardcodes domain via isProd into
cookieOptions (const cookieOptions) which can mismatch client-side
deleteCookieUtil(), causing cookie deletion to fail; update cookieOptions in the
logout handler to stop hardcoding domain — either read the cookie domain from an
environment variable (e.g., process.env.COOKIE_DOMAIN) and use that instead of
'.linkiving.com', or remove the domain property entirely so it mirrors the
client deleteCookieUtil() behavior; ensure sameSite/secure logic (isProd)
remains intact and reference cookieOptions and isProd in your change so the
logout route and client use the same domain resolution strategy.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a28ff4e9-a650-45cf-aa33-84c188ce5078
📒 Files selected for processing (2)
src/app/api/member/logout/route.tssrc/hooks/useLogout.ts
|
코드래빗 답변 확인부탁드립니다 @Bangdayeon |
6153d58 to
e5a218d
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/app/api/member/logout/route.ts`:
- Around line 27-41: The logout route's cookieOptions (isProd, secure, sameSite:
'none') must match the middleware's cookie attributes to ensure browser will
accept deletion; update the cookieOptions used in response.cookies.set (the
cookieOptions object near isProd and the three response.cookies.set calls) to
use the same attributes as your middleware (at minimum path: '/' and sameSite:
'lax' — and omit or align secure/domain flags exactly as middleware does), then
re-run tests/verification; ensure COOKIES_KEYS.ACCESS_TOKEN,
COOKIES_KEYS.REFRESH_TOKEN and COOKIES_KEYS.USER_INFO are cleared with the new
unified options.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 3009fff5-a352-462e-a762-a342bae89c1d
📒 Files selected for processing (2)
src/app/api/member/logout/route.tssrc/hooks/useLogout.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/hooks/useLogout.ts
e5a218d to
e339843
Compare
관련 이슈
PR 설명