FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(Registration): Email verification by Aaron-Detre · Pull Request #335 · WISE-Community/WISE-API · GitHub

feat(Registration): Email verification - #335

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

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

Conversation

Aaron-Detre commented Jul 21, 2026
edited
Loading

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 marked this pull request as ready for review July 22, 2026 00:12
hirokiterashima requested a review from breity July 22, 2026 16:38

breity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Functionality looks good. 👍

hirokiterashima left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

New changes look good!

I added some more code improvement suggestions inline. Lmk if you have any questions or want to discuss!

hirokiterashima left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It looks like there's a small possibility that a teacher will not be able to create a new account if the SMTP server does not send an email. For example, this could happen when the SMTP server reaches its daily send limit. To address this, we might want to limit the amount of verification emails on the server (wise-api) side. Let's think about this a bit more together.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL