且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用OTP(一次性密码)验证对用户进行身份验证

更新时间:2023-12-03 09:11:34

1) Create a Table with Mobile No/Email ID and user details and OTP columns'
2) Fill detail accordingly by registration form
3) Create services for get OTP  

       - Ask mobile number / Email address for OTP
       - If mobile number/email address already exists update OTP column with random string as OTP
       - Send OTP on Mobile/Email respestively 
    
4) Create service for Login

       - It needs mobile/email and OTP combination
       - Check that combination if it is correct then do login else return messsage "invalid login"

You have to modify it according to your need, I have just provided idea.