java - User sign-up with email verification -


I am developing a website using struts2 and jsp pages. After several sign-ups, in many sites, a link will be sent to your email and click after clicking on registration. I want this feature on my websty, but I do not know how to do it and how it is working? Should I save the user's information on my database until it is verified or not?

Any Tutorial?

The algorithm is something like this:

  1. Save user information, Mark it with a pending status.
  2. Generate a token that contains some information related to the user's account.
  3. Generate email, which should include the URL to activate the account and the token will be in the URL.
  4. The URL should point to some servlet or service in your app which will validate the token, check that the user related to the token is inactive, submit the completed form (Set user password, presenting captcha And so on) and the form on which you have activated the account with the password set.
  5. You should periodically scan the account of an account and remove those that are a few days old and have not been activated. Token to generate

, you can encrypt some data such as User ID, EMEE L, etc. and convert it into Base 64 (URL-SAFE Version) - when If you encrypt it, remember it salt. When you receive the token, you decode and decrypt it, and it should point to an inactive user account.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -