refactor(web): remove middleware pre-auth guard and dead auth flow#515
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85330883d2
ℹ️ 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); | ||
| } | ||
|
|
||
| return NextResponse.next(); |
There was a problem hiding this comment.
Restore pre-entry auth guard for protected /my flows
By removing the protected-route branch in middleware and always falling through to NextResponse.next(), logged-out users can now enter protected pages like /my/password and /my/apply-mentor (see apps/web/src/app/my/password/page.tsx and apps/web/src/app/my/apply-mentor/page.tsx) that do not perform an immediate auth check on mount. In this state, users can complete multi-step forms and only get redirected on submit when an authenticated API call hits the axios interceptor, causing avoidable data loss and a regression from the previous immediate login redirect behavior.
Useful? React with 👍 / 👎.
요약
robots.txt처리 및 probe 경로 차단은 유지했습니다.변경 사항
apps/web/src/middleware.tsloginNeedPages기반 선인증 분기 제거refreshToken존재 검사 기반/login리다이렉트 제거isNeedLogin쿠키 세팅 로직 제거robots.txt응답 및 probe 경로 차단 로직 유지apps/web/src/app/login/LoginContent.tsxisNeedLogin쿠키 감지/토스트 처리 제거community-members-onlyreason 토스트 처리 제거apps/web/src/lib/zustand/useAuthStore.tsisNeedLogin,setNeedLogin,clearNeedLoginapps/web/AUTHENTICATION.mddocs/auth-refresh-edge-cases.md검증
pnpm --filter @solid-connect/web lint:checkpnpm --filter @solid-connect/web typecheckci:check+next build)