简体   繁体   中英

Google Client Authorize doesn't work on Mobile IOS IPhone(41.0.2272.58)

We use gapi.js for Google authorising. It works correct on majority of desktop browsers and on mobile Safari. But it doesn't on Mobile Chrome IOS(41.0.2272.58).

In the begging we load gapi.js script

require(['https://apis.google.com/js/client.js?onload=gapiIsLoaded'];

Then we try authorize using:

gapi.auth.authorize(params, handler);

Params are

var params = {
                client_id: MY_CLIENT_ID,
                scope: MY_SCOPES,
                immediate: false // to open popup
            };

Browsers shows popup and I can autorize and continue work. IOS Safari works correct too.

But Chrome IOS never calls handler callback.

This issue extends to Chrome for Android 5.0. In my case, downgrading to 39.0.2171.59 resolves the problem. Hopefully this information puts you closer to finding the root cause.

通过添加重定向ur而不是打开窗口来解决问题, 网址为https://github.com/google/google-api-javascript-client/issues/189

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