简体   繁体   中英

Google+ JavaScript API Login Popup not returning Chrome on iOS

I am using the Google+ Javascript API log in button and it works perfectly fine in Chrome on Windows and Android. It also works perfectly fine in Safari on an iPad and iPhone. However, when using Chrome on the iPad or iPhone, the pop-up tab for the Google log in never returns after clicking to allow access. It seems to be submitting the form to the pop-up tab and never directing back to the original tab. Any ideas?

Google knows about this issue, but currently cannot do anything about it. It comes down to window.open not working in UIWebview.

Safari is not limited by App Store rules the way all third-party apps are. Apple can use any WebKit APIs they want to, whereas we are constrained to what is possible using UIWebView.

They encourage anyone facing this issue to open a bug with Apple.

You can't make Apple do anything, but anyone affected by this can file a bug against Apple about the fact that UIWebView doesn't support window.open and subsequent cross-site scripting, to clearly communicate demand for that support.

There's no way for people to add votes or comments to existing Apple bug reports, so the usual advice is for everyone to file their own.

Here's the URL for bug reporting in Apple: https://bugreport.apple.com

Here is a sample bug posting to Apple provided by one of the users :

Summary: Please add support for window.open and subsequent cross-site scripting to UIWebView. This is blocking Facebook/Twitter/etc login workflows in Chrome for iOS for example

Steps to Reproduce: 1. In a tab, open a page that runs the code var w = window.open(yourURL, null, null); 2. The page at yourURL should try to access var w = window.open(yourURL, null, null); 2. The page at yourURL should try to access window.opener`, such as to postMessage back to the original page 3. Don't profit.

Expected Results: New window can access window.opener.

Actual Results: window.opener is undefined.

Version: 7.0.4

Notes:

Configuration: Chrome Version (from "Settings > About Google Chrome"): 19.0.1084.60 Device Type: iPad 3

You can follow the issue thread for updates.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM