前后端分离的项目
现在项目中要发送验证码和短信来做一些验证
问题是, 现在有好几个页面都有这些验证, 比如登录可以发短信, 注册也需要发短信;
注册需要发验证码, 其他页面也可能会发送验证码;
问题是, 如果用户在两台PC同时登录, 然后在PC-A上和PC-B上都申请了短信,此时用户输入短信后,应该如何判断哪个短信应该和后端的哪个短信去进行校验?
验证码也是, 如何判断用户发来的验证码应该和后端他哪个验证码进行校验?
过去多啦不再A梦2017-05-16 13:00:07
The same account should limit the verification code to only be sent once within the expiration period. Ask your backend to change the logic
PHPz2017-05-16 13:00:07
Save verification code through session or cookie
Every device is different
大家讲道理2017-05-16 13:00:07
1. The last verification code is valid, and subsequent ones will overwrite the original one.