Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email Verification #21

Open
rabrad opened this issue Feb 3, 2020 · 0 comments
Open

Email Verification #21

rabrad opened this issue Feb 3, 2020 · 0 comments
Assignees
Labels
feature New feature

Comments

@rabrad
Copy link

rabrad commented Feb 3, 2020

The user’s story
As the owner of the app, I want all of the subscribed users to use a valid email address, so I can make sure that the subscriptions are from the real users. A working email address is crucial for common tasks, such as resetting passwords and account management.

Technical implementation plan

  • Backend

1- Update the user model: Add isVerified attribute to user model.
2- Create token Verification Model which consists user id and token and set token to expire after 12 hours.
3. Update api/signup to send verification email to user if the user is registered successfully.

  • create and save the token which is going to be used for verification
  • use npm package nodemailer and sendgrid api for sending email
  • as mail text, create a link which redirects the user to /confirmation page with the token.
  1. Update api/login to check if the user is verified.
  2. Create api/confirmation to set user models isVerified field to true.
  3. Create api/resend to send a new confirmation email to user in case the token is expired.
  4. Update signup page to add confirm password field to the form.
  • Frontend
  1. Update signup page to check if verification email is sent successfully and if so display a message to instruct the user to check his email for confirmation link.
  2. Update login page to check if the user is verified and if not redirect the user to /resend page.
  3. Create /confirmation page where the user is going to be redirected to when he clicked the confirmation link. Within this page
    • if the user is verified, create a link which redirects to /login page
    • if the token expired, create a link to redirect the user to the /resend page to send a new confirmation email.
    • show the error messages
  4. Create /resend page to send new confirmation mail to user in case the confirmation token is expired.
  5. Update signup page to validate password with the help of npm package “password-validator”. Set rules for the password such as it must contain at least 1 uppercase, 1 lowercase, 1 digit, 1 symbol, no spaces with min(8) number of characters.
@rabrad rabrad added the feature New feature label Feb 3, 2020
@rabrad rabrad added this to In progress in HackYourShop Features Feb 3, 2020
@EsraZengn EsraZengn moved this from In progress to Done in HackYourShop Features Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
Development

No branches or pull requests

2 participants