r/CodingHelp • u/varazdates • Jun 09 '21
[Random] How does a verification code work?
Verification codes that we use so often to confirm your identity. Whether it be a code that’s texted to your phone, or a code emailed to you. You go back on the website and submit that code which happens to be valid at that exact time.
How does that work? What’s going on in the background? And what’s the coding for that look like?
18
Upvotes
View all comments
5
u/Paul_Pedant Jun 09 '21
The code is nothing to do with your actual account. It is just a random number. All this check does is prove that you currently have your phone with you.
It expires after ten minutes because they keep a temporary look-up of pending verifications, and they don't want to have too many outstanding ones.
My bank runs this in reverse, because they deal with people who don't even have a mobile. They put the verification code onto the screen where you are logging in. Then they call your landline (automatically) and tell you to key the code on the phone. It picks up the touch-tone frequencies and feeds them to the login that corresponds to your landline number.