I am designing a web app for iOS - this app sends login data to a remote server (via AJAX JSONP request) to validate the users login.
So my local app sends username and password to a remote server and gets back a true or false.
How can I ensure that my app registers that a user is logged in (or logged out) both on the local app and the remote server? Cookies are not working in syncronicity (because of the cross domain policy).
I can set a local cookie if the server returns true
and do the same in a database on the server but how can I verify that requests to the server are from the local app without a valid cookie to refer to on the remoter server?
Look into sessions.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.