Is it dangerous to store the real User Id on client side?
Hi !
I have a user process registration consisting in three form pages. When the user submits the first form page the data is inserted into the DB, then the DB returns the User_Id number to the app. Now I am using this unique Id number and a Session variable in order to maintain state and to do several operations with the DB through the three form pages. To do this I store this unique Id user number in a hidden field (on the first form page), and then I need to pass that value through the three form pages (forward and back) to know the identity of the user on every form page. Well, I have two important doubts:
1. I know that using hidden fields, users can see the data containing in it. It can be a danger to store the real user id returned by the DB in a hidden field (for security reasons)? Or is it better that the DB gave it back another unique guide number for each user, instead of the real User_Id number?
2. To pass this data (unique Id for every user) from one page to another (forward and back), I am considering two ways: With the simple and less secure ‘Request.QueryString()’ or with the more complex but more secure ‘Server.Transfer’. In my case, What is the best way?
Thank you,
Cesar