Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Walkthrough미들웨어가 토큰 만료 검사 로직을 간소화했습니다. 로컬호스트 요청은 인증 검사를 건너뛰고, 리프레시 토큰 만료 여부 확인을 제거하되 토큰 부재 시에만 로그인을 강제하도록 변경되었습니다. 주요 변경사항:
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1d810aa3b
ℹ️ 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".
| return buildLoginRedirectResponse(request); | ||
| } | ||
|
|
||
| if (needLogin && isTokenExpired(refreshToken ?? null)) { | ||
| return buildLoginRedirectResponse(request, { clearRefreshToken: true }); | ||
| } | ||
|
|
||
| return NextResponse.next(); |
There was a problem hiding this comment.
Reinstate refresh-token expiry guard on login-required paths
With this change, /mentor, /my, and /community only check whether refreshToken exists, and no longer validate expiration before allowing the request through. In stage/prod, a user with an expired but still-present cookie now bypasses the middleware redirect and reaches protected pages until downstream API calls fail, and the cookie-clearing path is never executed. This is a regression from the previous behavior where expired refresh tokens were redirected to /login immediately.
Useful? React with 👍 / 👎.
배경
localhost)에서는 stage 도메인 refresh 쿠키를 미들웨어에서 읽을 수 없어,/mentor,/my,/community진입 시 즉시/login으로 리다이렉트되는 문제가 있었습니다.변경 사항
apps/web/src/middleware.tslocalhost,127.0.0.1호스트에서는 로그인 미들웨어 가드를 스킵하도록 처리했습니다.기대 효과
검증
pnpm --filter @solid-connect/web run lint:check통과pnpm --filter @solid-connect/web run typecheck:ci통과@solid-connect/web ci:check+build통과