Google appengine authentication on iPhone web application on home screen

I use the Google appengine to develop a web application designed for use in both the browser and iphone. I bought a domain name for this application, so I have a pretty URL. I used the User API for authentication. This works great on desktop browsers and iPhone Safari.

The user can add the application to the main screen (by clicking "+" on the bottom toolbar). However, when this is done, it seems that the cookies set by Google do not work in this “application” and the user has actually logged out. Even worse, when the user clicks on the login link (as generated by GAE), the application closes and opens the safari to complete the login. Since the session does not seem to be shared between them, the login process is useless and the version of the "home screen" of the application continues to log out.

Cookies do not seem to be shared between the home screen app and Safari. It also seems that the "home screen" application will only work inside it, and any redirect to any other domain will open Safari. Any idea how I can fix this?

+3
source share
1 answer

Solved this and just wanted to post the solution here.

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

The strangest thing! I don’t know why I would be forced to use JS for this.

+1
source

Source: https://habr.com/ru/post/1740562/


All Articles