How to design a message reset password feature

Source: Internet
Author: User
A very common function, the user forgot the password, by entering the previously registered mail, we send a link to the user's mailbox to reset the password. User name + random string + expiration time, then encrypt with MD5, is this design feasible? How do I clear an expired identifier if the user does not have a click link?

Reply content:

A very common function, the user forgot the password, by entering the previously registered mail, we send a link to the user's mailbox to reset the password. User name + random string + expiration time, then encrypt with MD5, is this design feasible? How do I clear an expired identifier if the user does not have a click link?

The entire process:

  • Registration requires each user to use a unique mailbox, sign up and send a message to the user's mailbox
  • Find password to ask the user to fill in the email address, prompting the user if you do not remember the address please search in the mailbox
  • Recover password function limit can only use three times per account (only three messages), use the cache to complete this count
  • When a password is retrieved, a random string is written to the cache as token, which is valid for one day, sending a link containing tokens to the user's mailbox
  • Users from the link back to verify the validity of Token, and then prompt to fill in the new password, and then submit the new password and Token to the backend to complete the change of password operation
  • Delete Token Cache
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.