Skip to content

Add email verification functionality if using email and password to signup #1

@ceghap

Description

@ceghap

When creating the user (signup page), add 2 features:

  • Insert email, token and token expires into VerificationToken table .
    • identifier: email
    • token: token
    • expires: timestamp (24 hours?)
  • send the 'email verification' email to the registered email.
    • the email should contain a link to a page or endpoint (see which one is better) something like this /api/verify?email=xxx&token=yyy

image

The method to handle nodemailer sending the emails is done in /src/utils/verifyEmail.ts. Please rename this path and the function name as I think the name is misleading.

After user click the link, if everything is match and valid, redirect user to signin page. if not, redirect to 'unverified' page and allow to resend the new 'email verification' email

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions