When I login to my PhoneGap app everything works correctly. I can make requests in the current session and I am authenticated. If I completely close the app and restart it though my session is gone. The cookie with the connect.sid does not persist between app restarts -- this is a PhoneGap issue I can't get around.
How should I get the connect.sid from the cookie?
How should I store it in localStorage?
How can I add the connect.sid back to the cookie on app start?