04-17-2013 05:06 PM
Similar to Facebook, Twitter, and other apps, I only have to log in once unless I log out myself. How can I do this for my WebWorks app?
My app simply hosts a web page that does all the authentication. I'm guessing it writes a cookie to the device but then removes the cookie with the app closes. I am required to login every time I open the app. This is a pain!
04-18-2013 12:30 PM
Are you sure the cookie gets cleared? From my experience, the cookies remain even after restarting the app.
Let me know what the above returns after a) the server sets the cookie b) the app restarts
04-18-2013 04:34 PM
Hi, unfortunately cookies do not remain after app is closed.
What I suggest is to use localstorage.
And then in the app initialization properties you can set the cookie with document.cookie = window.localStorage.getItem('cookieContent');
You've to check if the item exists and all the stuff.
If my answer was helpfull please like my post.
04-22-2013 11:13 AM
Thanks for the responses. I didn't get a chance to check if the server cookie gets set and what happens when re-opening the app. I decided not to call web page url's from my app. I went with BBUI.js to re-create the front-end and implemented web service calls to get the data from the server. I am using localStorage to store authentication info and sending with each web service call. Thus, the cookie scenerio is no longer applicable.