Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da92abd379
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const { data, error } = await supabaseAdmin | ||
| .from("profiles") | ||
| .update({ name }) | ||
| .eq("email", email) | ||
| .select("id") |
There was a problem hiding this comment.
Require auth before admin profile update
This route updates profiles (and then auth.users metadata) using the service-role client with only an email address as the selector. Because there is no access‑token check anywhere in the handler, any unauthenticated caller who knows or guesses an email can change that user’s name and metadata. The /api/set-password route already shows the pattern for verifying a Bearer token; the same kind of auth check is needed here to prevent unauthorized profile tampering.
Useful? React with 👍 / 👎.
| setOtp(""); | ||
| setOtpMsg(""); | ||
| setIsVerified(null); | ||
|
|
||
| sendOtp(); |
There was a problem hiding this comment.
Avoid auto-resending OTP on failed verification
Because the effect depends on isVerified, any failed verification (isVerified=false) triggers this block, which clears the OTP and immediately calls sendOtp(). The block also sets isVerified(null), which causes the effect to run again and can send another OTP on the next render. This means a single wrong code can spam multiple OTP emails and wipe the user’s input/error message, making retries confusing. Consider only auto‑sending on the initial “email is available” transition or gating it with a separate flag.
Useful? React with 👍 / 👎.
🚀 Pull Request
📝 PR 유형
🔍 변경 사항
회원가입 기능 추가
📸 스크린샷
🚧 관련 이슈
🛠️ 최종 배포 점검 리스트
✅ 최종 배포 점검 결과