Skip to content

Fix signup OTP flow and Not Found redirect on privacy links#327

Open
Honey-pg wants to merge 1 commit into
Nsanjayboruds:mainfrom
Honey-pg:fix/signup-otp-flow
Open

Fix signup OTP flow and Not Found redirect on privacy links#327
Honey-pg wants to merge 1 commit into
Nsanjayboruds:mainfrom
Honey-pg:fix/signup-otp-flow

Conversation

@Honey-pg

Copy link
Copy Markdown
Contributor

Pull Request

Summary

Fix the signup OTP flow by resolving broken privacy routes that caused 404 redirects, preventing indefinite "Sending OTP..." loading, and hardening backend email delivery with clearer errors.

Description

Users reported that signup stayed on "Sending OTP..." for a long time and then redirected to a Not Found page. Several issues contributed:

Changes made:

  • frontend/src/App.jsx — Added /privacy/privacypolicy redirect
  • frontend/src/pages/Registration.jsx — Fixed Privacy Policy link, added inline submitError, aligned name validation to min 3 chars, added skipAuthRedirect on OTP API calls
  • frontend/src/pages/LandingPage.jsx — Updated footer Privacy links to /privacypolicy
  • frontend/src/utils/apiConfig.js — Added 30s axios timeout to stop infinite loading
  • frontend/public/_redirects — Added SPA fallback for Render deep links like /signup
  • backend/config/sendEmail.js — Added SMTP timeouts and startup warning when email env vars are missing
  • backend/controller/authcontroller.js — Returns 503 fast if email service is not configured
  • backend/.env.example — Documented EMAIL_USER and EMAIL_PASS

Why:

  • /privacy had no route, sending users to the 404 page during signup
  • Missing request/SMTP timeouts caused the button to stay in "Sending OTP..." indefinitely
  • Unconfigured email on Render failed silently instead of returning a clear error
  • SPA fallback ensures /signup loads correctly after refresh on Render

Related Issue

Fixes #311

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • UI/UX improvement
  • Refactoring

Checklist

  • Code follows project guidelines
  • Tested locally
  • No console errors
  • Documentation updated if required

Add privacy route redirect, axios timeout, signup error handling, SMTP timeouts, email env validation, and SPA fallback for Render.
@Nsanjayboruds

Copy link
Copy Markdown
Owner

@Honey-pg please slove the conflit and provide screenrecording of your change

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.

[Bug]: Signup Stuck on "Sending OTP..." and Redirects to Not Found Page

2 participants