Error loading javascript api Google oauth2 when logging into multiple google accounts

I am trying to use the Google+ login button via javascript api. Everything works fine on Windows computers and Chromebooks, but it fails on all Mac computers, and I was able to test it. (see update 2 below, this is not a Mac problem)

When the source api file for Google is downloaded ( https://apis.google.com/js/client:platform.js ), an error is written to the console saying that https://accounts.google.com/o/oauth2/iframerpc ? scope = email + profile & response_type = token + id_token & login_hint = [HINT] & origin = [ORIGIN] & action = issueToken & ss_domain = [SS_DOMAIN] & hd = [HD] & client_id = [CLIENT_ID] & hl = en & from_login = 1 & as = [AS] returned an error on the server side . When I directly pull up the URL in the browser, I get a JSON object with one property:

{"error":"internal_server_error"} 

This only happens on Mac computers (Google Chrome, havenโ€™t tried another browser), and all this works fine in an incognito window. (see updates below, Mac is not a problem)

UPDATE:

I determined that this only happens if the user is logged into a Google account; and, moreover, only when a user tries to authenticate on my website using one of the accounts that is not marked as the โ€œdefaultโ€ account (aka the first Google account they logged in to).

This also happens in Safari.

UPDATE 2:

This is NOT a problem with the Mac, itโ€™s just a coincidence that 5 or so of the users affected by it all use a Mac (although our company probably only has 10 out of 200 users using a Mac, and the only people reporting this error associated with the use of Mac computers).

The real problem occurs on any computer, but ONLY when a user logs into several Google accounts and tries to authenticate on my site using one of his Google accounts, which is not the default account.

PS Thanks @branjt for a thematic update that turned out to be very accurate.

0
javascript google-oauth google-oauth2
source share
1 answer

Thanks for the report, Blair. It took us a while to figure out the root cause of this, and your comments helped you. Assuming that this is the error we are thinking about, we returned the fix to the release last Wednesday, which solves the problem. Please let me know if this is not the case!

0
source share

All Articles