Context:
I am actually developing a small web application (C # / MVC2). Users will use their iPhone (and possibly Android phones in the future) to access it.
This is quite simple at the moment (it just shows some information and reports from our ERP client), and I decided to try creating a local webapp that users could add to their iPhone so that they have an icon for this and, most importantly, most files are locally cached, so using json from the server only the relevant data is received.
Problem:
To authenticate users, a small form requests a username and password and sends them to the server via ajax, which, in turn, verifies the user and sets authcookie. If the application is run in Safari, everything works fine, but if it runs locally (that is, in Mobile Safari directly from the icon), the server correctly checks the user, but this check is lost when the next ajax call to restore data.
Does this mean that the session cookie is not supported by Mobile Safari in webapps? Am I doing it wrong?
And most importantly: what is the best way to authenticate users in a local webapp that accesses remote data?
source
share