Summary of What Has Been Done
During user registration, the isEmailVerified field is being hardcoded or defaulted to true when saving the new user to the database. This completely bypasses the email verification requirement, allowing anyone to register with fake or unowned email addresses.
Changes Made
- Need to modify
backend/controllers/authController.js and backend/models/User.js.
- Ensure
isEmailVerified defaults to false in the Mongoose schema.
- Remove any hardcoded overrides in the registration controller.
- Ensure the user cannot log in or access protected routes until they successfully verify their email token.
Impact it Made
- Secures the platform from bot registrations and spam accounts.
- Ensures only verified email owners can access authenticated features and consume server resources.
Summary of What Has Been Done
During user registration, the
isEmailVerifiedfield is being hardcoded or defaulted totruewhen saving the new user to the database. This completely bypasses the email verification requirement, allowing anyone to register with fake or unowned email addresses.Changes Made
backend/controllers/authController.jsandbackend/models/User.js.isEmailVerifieddefaults tofalsein the Mongoose schema.Impact it Made