Using the Empire as an interface, Android and iOS do not get $ _ SESSION

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.