Login using SMS verification code development process and explain the steps

the entire process:

1, the user submits the phone number and request a verification code SMS

2, generates a message authentication code: generating a random position 4 or 6 digits random sequence requires the use of an object, the message authentication code is a numeric string;

3, phone number, verification code, creation time into session, redis or database, choose one of these three ways

4, call the SMS platform interface to send a verification code to the user's mobile phone text messages

5, users receive a text message after backfilling verification code to the login page and submit the login form

6, and the verification code comparison verification code Session is consistent submitted, submitted at the same time determines whether the operation period;

7, correct codes and, in the period, by a request, the processing corresponding service.

 

Complete demo you refer to my blog: https://blog.csdn.net/zuoliangzhu/article/details/89790589

You can also refer to the official case: //smsow.zhenzikj.com/doc/sdk.html

Guess you like

Origin www.cnblogs.com/laozuo3/p/11563000.html