> I suppose I could Ajax in a username/password and store the session_id
> either in a cookie or local storage?
PhoneGap uses a browser, and by default handles cookies..
A ajax request with username/password is enough, web2py sends back a
result with a cookie header and PhoneGap remembers this.
There is nothing special you should have to do...
(I just started with PhoneGap myself and had no trouble with auth /
sessions in my tests)
Fyi; I did run into a problem with scrolling (at least under Android,
the browser does not support overflow scroll in a div. you could solve
this with iScroll)
var request = new XMLHttpRequest();
request.onreadystatechange = function()
{
if (request.readyState == 4)
{
// handle result..
}
}
request.open('POST', 'http://domain.tld/login');
request.setRequestHeader('Content-type','application/x-www-form-
urlencoded');
request..send('[email protected]&password=xxxxx');