The registration and login interfaces written by the empire cannot be obtained from $ _ SESSION during Android and iOS calls. the specific scenarios are as follows: at the time of registration, Android will send me a mobile phone number. after verification, it will send a verification code to the message platform. I will put the verification code of the message platform to $ _ SESS... the registration and login interfaces written by the empire cannot be obtained from $ _ SESSION during Android and iOS calls. the specific scenarios are as follows: at the time of registration, Android will send me a mobile phone number. after verification, it will send a verification code to the message platform. I put the verification code of the message platform into $ _ SESSION and send it back to Android, but Android cannot get it. is there no $ _ SESSION mechanism in Android? What do you say? If you have any experience in this area, please give me some answers. what should I do?
Reply content:
The registration and login interfaces written by the empire cannot be obtained from $ _ SESSION during Android and iOS calls. the specific scenarios are as follows: at the time of registration, Android will send me a mobile phone number. after verification, it will send a verification code to the message platform. I put the verification code of the message platform into $ _ SESSION and send it back to Android, but Android cannot get it. is there no $ _ SESSION mechanism in Android? What do you say? If you have any experience in this area, please give me some answers. what should I do?
First, the api call is stateless, that is, the session is invalid. In addition, you must understand the principle of the session, A session is a session ID stored in the cookie on the client to obtain data on the server, that is, the session value.
Next, let's talk about your requirements. you just need to log on with a mobile phone verification code. you can save the verification code to the cache based on the verification code with the mobile phone number as the key value. redis and mc can both be used, you can obtain it during verification.