Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
워크스루이 변경사항은 카카오 인증 및 미들웨어의 커뮤니티 관련 로직을 정리하는 작업입니다.
예상 코드 리뷰 노력🎯 2 (Simple) | ⏱️ ~12분 제안 검토자
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cccda51d26
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| toast.success("로그인에 성공했습니다."); | ||
|
|
||
| setTimeout(() => { | ||
| router.push("/"); | ||
| }, 100); | ||
| } else { | ||
| // 새로운 회원일 시 - 회원가입 페이지로 이동 | ||
| router.push(`/sign-up?token=${data.signUpToken}`); | ||
| } | ||
| setTimeout(() => { | ||
| router.push("/"); | ||
| }, 100); |
There was a problem hiding this comment.
Preserve signup redirect for unregistered social logins
This success path now runs even when data.isRegistered is false, but the unregistered social auth responses only carry signUpToken (not an access token) per apps/web/src/apis/Auth/api.ts, so first-time Kakao users are sent to / as if login succeeded and cannot continue onboarding via /sign-up?token=.... That breaks new social-user registration flow and leaves users in a pseudo-logged-out state; please keep the unregistered branch redirect to signup (the same regression appears in the Apple hook).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5fc96d489d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| toast.success("로그인에 성공했습니다."); | ||
|
|
||
| setTimeout(() => { | ||
| router.push("/"); | ||
| }, 100); | ||
| } else { | ||
| // 새로운 회원일 시 - 회원가입 페이지로 이동 | ||
| router.push(`/sign-up?token=${data.signUpToken}`); | ||
| } | ||
| setTimeout(() => { | ||
| router.push("/"); | ||
| }, 100); |
There was a problem hiding this comment.
Restore signup redirect for unregistered Apple auth
When data.isRegistered is false, this success path still shows a login-success toast and redirects to /, which skips onboarding for first-time Apple users. The unregistered Apple response type only provides signUpToken (no accessToken) in apps/web/src/apis/Auth/api.ts, so these users cannot become authenticated on / and lose the only token needed to continue via /sign-up?token=....
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9fc30e9d70
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // HTTP-only 쿠키의 refreshToken 확인 | ||
| const refreshToken = request.cookies.get("refreshToken")?.value; |
There was a problem hiding this comment.
Honor cookie-login flag before enforcing route redirects
The middleware now always enforces refreshToken cookie checks, but this repo still defines NEXT_PUBLIC_COOKIE_LOGIN_ENABLED=false for development (apps/web/.env.development), which is the mode documented for localStorage-based debugging; in that configuration, protected routes like /mentor, /my, and /community will redirect to /login even after client-side login because no HTTP-only cookie is expected. Please keep the flag gate (or remove the false-mode config/docs in the same change) so development auth flow does not break.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/web/src/middleware.ts (1)
4-4:⚠️ Potential issue | 🟠 Major1) 보호 경로 정책이 PR 목표와 아직 불일치합니다.
- Line 4의
loginNeedPages에"/community"가 남아 있어, 비로그인 사용자는 지금도/community접근 시/login으로 리다이렉트됩니다.- 이번 PR 목표가 “보호 경로를
/mentor,/my로 제한”이라면 현재 동작은 목표와 어긋납니다.수정 제안 diff
-const loginNeedPages = ["/mentor", "/my", "/community"]; // 로그인 필요페이지 +const loginNeedPages = ["/mentor", "/my"]; // 로그인 필요페이지Also applies to: 22-25
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/web/src/middleware.ts` at line 4, The loginNeedPages array in middleware.ts still contains "/community", causing non-authenticated users to be redirected to /login contrary to the PR goal to protect only "/mentor" and "/my"; remove "/community" from the loginNeedPages constant (leave only "/mentor" and "/my") and update any code that references or iterates over loginNeedPages (the redirect/check logic in this file) so it only enforces protection for those two paths.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@apps/web/src/middleware.ts`:
- Line 4: The loginNeedPages array in middleware.ts still contains "/community",
causing non-authenticated users to be redirected to /login contrary to the PR
goal to protect only "/mentor" and "/my"; remove "/community" from the
loginNeedPages constant (leave only "/mentor" and "/my") and update any code
that references or iterates over loginNeedPages (the redirect/check logic in
this file) so it only enforces protection for those two paths.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ec4e94ed-5dad-44cf-8d61-42540b2f4e93
📒 Files selected for processing (2)
apps/web/src/apis/Auth/postKakaoAuth.tsapps/web/src/middleware.ts
💤 Files with no reviewable changes (1)
- apps/web/src/apis/Auth/postKakaoAuth.ts
변경 사항
NEXT_PUBLIC_COOKIE_LOGIN_ENABLED플래그 분기 제거/mentor,/my로 한정refreshToken쿠키가 없으면/login으로 리디렉션/)으로 통일상세
middleware.ts/community보호/reason파라미터 처리 제거postKakaoAuth.ts,postAppleAuth.ts검증
pnpm --filter @solid-connect/web run ci:check통과ci:check+build통과