Skip to content

[Security]: Email verification bypassed - isEmailVerified hardcoded to true on registration #1429

Description

@sahare77

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.

Metadata

Metadata

Assignees

Labels

claimedThis issue has been claimed by a contributor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions