Why We create Temporary User Before Actual User

In secure web application with genuine user, we don't create direct object of User at a time of user sign up instead of at the time user sign up on your application we create a temporary User Object in which we store only some fields of user which are taken at a time of sign up. (Example : name , email Id , password,contact no).
We provide option of user verification through email or mobile number.
When user verified himself on your application then we create the Object of User and persist in database with all fields and give his all functionality of Users. (Example : check balance , update profile ,update Information and many more).
Creating a temp object of user and store in database it gives lots of benefit and these are.
  •  Security : no unsecured or unverified user exist.
  •  Fetching Speed : many users only sign up on application not used it so unnecessary user data not store in database.
  •  Safety From Attackers : if any one create a loop of 1000 times and signup through rest API continuously then waste user data  are  not store in actual User table.
It Store in TemporaryUser table so this type of activity will not affected our application.
If we create any Bank application or secure application its most considerable things is existence of verified user. User verification can be done  by either  user email Id or user phone number.
Email Id and phone number is a easiest way of verify any type of user in secure way and this verification process is also provide safety from hackers. 
If hackers try to sign up our application through looping code then it will quit difficult to user (email and phone) verification through  code and hacker continuous signup request not affect our application because we store User object in TemporaryUser Object before verification. 

Comments

Popular posts from this blog

JIT Compiler

Authentication using One Time Password (OTP)

JWT to Secure REST API with Spring Boot