Skip to content

Comments

Fix phone verification to return 501 error in production#63

Draft
Copilot wants to merge 2 commits intofeature/updatesfrom
copilot/sub-pr-61-again
Draft

Fix phone verification to return 501 error in production#63
Copilot wants to merge 2 commits intofeature/updatesfrom
copilot/sub-pr-61-again

Conversation

Copy link

Copilot AI commented Nov 27, 2025

📌 PR Title

fix: return 501 error for phone verification in production


📝 Description

Addresses feedback from PR #61. Phone verification was silently succeeding in production without sending SMS, creating a confusing UX where users never receive verification codes.


✅ Changes

🔐 Authentication System

  • register/route.ts: Return 501 (Not Implemented) error when phone verification requested in production
  • resend-verification/route.ts: Same fix for resend flow
if (process.env.NODE_ENV === 'development') {
    console.log(`📱 PHONE VERIFICATION TOKEN for ${phone}:`, token);
} else {
    return NextResponse.json(
        { error: "Phone verification is not yet implemented" },
        { status: 501 }
    );
}

🔍 How to Test

  1. Set NODE_ENV=production
  2. Attempt registration with phone number
  3. Verify 501 response instead of silent success

⚡ Additional Notes

  • Development mode unchanged: token logged to console for testing
  • Production now explicitly fails rather than misleading users

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Nov 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
smart-todo Ready Ready Preview Comment Nov 27, 2025 8:16pm
smart-todo-wum3 Error Error Nov 27, 2025 8:16pm

Co-authored-by: chemist-god <117123746+chemist-god@users.noreply.github.com>
Copy link
Author

Copilot AI commented Nov 27, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint.prisma.io
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/smart-todo/smart-todo/node_modules/prisma/build/child {&#34;product&#34;:&#34;prisma&#34;,&#34;version&#34;:&#34;6.17.1&#34;,&#34;cli_install_type&#34;:&#34;local&#34;,&#34;information&#34;:&#34;&#34;,&#34;local_timestamp&#34;:&#34;2025-11-27T20:09:28Z&#34;,&#34;project_hash&#34;:&#34;85c6752e&#34;,&#34;cli_path&#34;:&#34;/home/REDACTED/work/smart-todo/smart-todo/node_modules/.bin/prisma&#34;,&#34;cli_path_hash&#34;:&#34;e76bd0cf&#34;, (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Address changes based on feedback from PR #61 Fix phone verification to return 501 error in production Nov 27, 2025
Copilot AI requested a review from chemist-god November 27, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants