3

I'm using Google appengine for developing an web application that is meant to be used on both the browser and iphone. I have purchased a domain name for this application, so that I have a pretty URL. I've used the User API for authentication. This works just fine on desktop browsers and iPhone Safari.

The user could add the application to the home screen (by tapping the "+" at the bottom toolbar). However when that's done, it seems like the cookies set by Google are not in effect within this "application", and the user is effectively logged out. To make matters worse, when the user clicks on the login link (as generated by GAE), the app closes and opens safari to complete the login. Since the session is apparently not shared between the two, the login process is futile, and the "home-screen" version of the app continues to be logged out.

It seems that the cookies are not shared between a "home-screen" app and Safari. It also seems that the "home-screen" app will only work within it's own domain, and any redirect to any other domain will open Safari. Any idea how I can go about fixing this?

Rakesh Pai
  • 26,069
  • 3
  • 25
  • 31

1 Answers1

1

Solved this, and just wanted to post the solution here.

The fix was as simple as setting the link href="javascript:window.location.href=\"whatever\";".

The weirdest thing! No idea why I'd be forced to use JS for this.

Rakesh Pai
  • 26,069
  • 3
  • 25
  • 31
  • I have same issue (only I use custom logging, but it doesn't meter). Frankly I can't understand your fix. Where did you set this setting? – RredCat May 23 '12 at 08:12
  • Ah. Frankly, I don't recollect any more. (This was more than two years ago!) I'm guessing I was referring to the Login link that goes to Google for authentication, but I might be wrong. I admit - this was a bad answer. – Rakesh Pai May 23 '12 at 19:53
  • I had asked like question and received good answer. You cant check it - http://stackoverflow.com/a/10719376/182344. If it interesting for you. – RredCat May 25 '12 at 05:45