Here is a story from me:
I was once a customer of an online audiobook store. Besides authenticating myself with a username and password, I also needed my browser to accept cookies. It was unusual. A cookie is probably needed to store the session ID.
But I got confused as the session identifier was also passed in the url and I did not see the reason why there is a need for cookies. So I looked into the cookie jar to find out what important information should be stored in cookies.
In addition to the cookie for the session identifier, there was another cookie with the name customer_id , which was obviously assigned to identify me by my client number. I thought, “C'mon, no one can be so stupid!” I changed the value for fun by changing one digit of a number (e.g. from 12345 to 12346) to find out what will happen.
Now guess what: now I signed up as a different user without any additional authentication request, just by changing the cookie! The customer_id cookie value was clearly not only for identification (who am I?), But for authentication (am I really the one I pretend to be?)!
The moral of this story: Always separate identity from authentication.
Gumbo source share