Have any of you guys done a project that separates the front-end and back-end of php+vue.js? I would like to ask, the front-end sends a verification code to register and log in.
小萝卜头2020-05-25 11:21:12
0
5
1160
The front-end sends SMS verification code to log in and register. How to maintain the session? And should the SMS verification code be stored in the database or in the session? Or is there any other better solution?
replyThe session will become invalid, and the session data cannot be retrieved by calling the interface in vue.js. Because the sessionid here is always changing and relies on cookies, it cannot be obtained! I switched to redis to send text messages. The problem has been solved. Thank you.
Save redis
If you don’t understand, you can ***Q: 895163012
This does not exist across domains, just use the SMS api interface callback, log in, usually session
Because it involves cross-domain, the session will be invalid? What's the solution?