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.
javascript google-oauth google-oauth2
Blair connolly
source share