Skip to content

feat(Registration): Email verification#335

Open
Aaron-Detre wants to merge 22 commits into
developfrom
email-verification
Open

feat(Registration): Email verification#335
Aaron-Detre wants to merge 22 commits into
developfrom
email-verification

Conversation

@Aaron-Detre

@Aaron-Detre Aaron-Detre commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Added two new fields to teacher_user_details table in database: isVerified and verificationCode.
  • After registering a new teacher account (not Google or Microsoft), an email is sent containing a link to verify your new account.
  • Added endpoint to check whether user is verified (only relevant for teachers).
  • Added endpoint to verify a teacher account, send them the welcome email, and then redirect them to the login page.
  • Added endpoint to resend the verification email.
  • Moved mail related methods into MailService.

Test

  • Test with feat(Registration): Email verification WISE-Client#2328
  • ALTER TABLE teacher_user_details
    ADD COLUMN isVerified BIT(1) NOT NULL DEFAULT TRUE,
    ADD COLUMN verificationCode VARCHAR(255) NULL;
  • Nothing should change when creating a student account or a teacher account with Google or Microsoft.
  • Creating a new teacher account with email should send a verification email.
  • Clicking the link in that email should trigger a welcome email to be sent and you should be redirected to the WISE login page.
  • Clicking to resend the verification email should send the verification email to your account again.

Other

  • Three tests that have been around for years were failing. I checked it out, but they all seemed to have actually been written incorrectly. I changed them in the latest commit, but I'm not sure why they only started causing issues now. I guess it's possible that they were written correctly before and I've just changed them to be incorrect, but I don't see how that could be the case.

@Aaron-Detre
Aaron-Detre marked this pull request as ready for review July 22, 2026 00:12
@hirokiterashima
hirokiterashima requested a review from breity July 22, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant