Google-api-javascript-client: Multiple user auth popup requires click, reload, click to select account

Created on 7 Jan 2015  Â·  5Comments  Â·  Source: google/google-api-javascript-client

_From [email protected] on September 23, 2013 12:36:32_

What steps will reproduce the problem? If possible, provide a live demo of the issue. 1. Go to https://www.draw.io whilst logged into at least two Google accounts.

  1. Click on the "connect to Drive" button (top right).
  2. Click on one of the accounts What is the expected output? What do you see instead? A single click on the required account should select the account. Instead you have to click, wait for reload and click again. What version of the product are you using? On what operating system? The hosted version of the JS client API library is used, this behaviour has been present since at least the start of 2013. The behaviour is the same on all OSes and browsers we've test, Chrome, FF, Safari, IE 9, 10 and 11. Please provide any additional information below. We had this initial discussion - http://stackoverflow.com/questions/13366254/is-it-possible-to-be-able-to-correctly-select-any-available-google-account-to-us - to get to this stage. We're setting immediate to false and authUser to -1 on the gapi.auth.authorize call, that's the only option that allows us to get the multiple account handling to work in any way.

_Original issue: http://code.google.com/p/google-api-javascript-client/issues/detail?id=108_

2–5 stars Priority-Medium bug imported

Most helpful comment

_From [email protected] on October 09, 2013 14:00:38_

Asana.com is experiencing this issue as well.

Here are the simplest live reproduction steps I can think of.

What steps will reproduce the problem? If possible, provide a live demo of the issue.

  1. Log into at least two Google accounts.
  2. Go to https://google-api-javascript-client.googlecode.com/hg/samples/authSample.html .
  3. Open the Javascript console and enter gapi.auth.authorize({client_id: clientId, scope: scopes, immediate: false, authuser: ''}, handleAuthResult);. You may have to enable pop-ups to see the dialog.
  4. Click on one of the accounts.

What is the expected output?
The dialog should take me to the permissions confirmation step ("This app would like to: Know who you are on Google").

What do you see instead?
The dialog does not visually change. You have to click on an account again before it takes you to the next step.

What version of the product are you using? On what operating system?
As far as I can tell, this is present on (but not limited to) Chrome, Firefox and IE for both Windows and Mac.

Please provide any additional information below.
When an account is clicked for the first time, the page is reloaded to a different (but similar) URL, which seems visually identical. Both URLs contain a "continue" parameter, but the value of the continue parameter changes from looking like: https://accounts.google.com/o/oauth2/auth ?response_type=token
&scope= https://www.googleapis.com/auth/userinfo.email+https://www.googleapis.com/auth/userinfo.profile+http://www.google.com/m8/feeds/ &redirect_uri=postmessage
&proxy=oauth2relay314016275
&state=1739454259%7C0.776089678
&origin= https://localhost.asana.com:8180 &client_id=
&authuser
&authuser=0
&hl=en
&from_login=1
&as=-2ac32a9ddc775282

before an account is clicked, to looking like: https://accounts.google.com/o/oauth2/auth ?zt=ChRzUFJFWklyY0N5TjhxYXVwZFBoehIfb2hWV3BmSWFORlFjTXFUbUhqeVRGR013SFUwMWd3SQ%E2%88%99APsBz4gAAAAAUlSokO2bKw-DWW75kaZUVm_68SSZbc1u
&from_login=0
&hl=en
&as=-2ac32a9ddc775282

after an account is clicked.

All 5 comments

_From [email protected] on October 09, 2013 14:00:38_

Asana.com is experiencing this issue as well.

Here are the simplest live reproduction steps I can think of.

What steps will reproduce the problem? If possible, provide a live demo of the issue.

  1. Log into at least two Google accounts.
  2. Go to https://google-api-javascript-client.googlecode.com/hg/samples/authSample.html .
  3. Open the Javascript console and enter gapi.auth.authorize({client_id: clientId, scope: scopes, immediate: false, authuser: ''}, handleAuthResult);. You may have to enable pop-ups to see the dialog.
  4. Click on one of the accounts.

What is the expected output?
The dialog should take me to the permissions confirmation step ("This app would like to: Know who you are on Google").

What do you see instead?
The dialog does not visually change. You have to click on an account again before it takes you to the next step.

What version of the product are you using? On what operating system?
As far as I can tell, this is present on (but not limited to) Chrome, Firefox and IE for both Windows and Mac.

Please provide any additional information below.
When an account is clicked for the first time, the page is reloaded to a different (but similar) URL, which seems visually identical. Both URLs contain a "continue" parameter, but the value of the continue parameter changes from looking like: https://accounts.google.com/o/oauth2/auth ?response_type=token
&scope= https://www.googleapis.com/auth/userinfo.email+https://www.googleapis.com/auth/userinfo.profile+http://www.google.com/m8/feeds/ &redirect_uri=postmessage
&proxy=oauth2relay314016275
&state=1739454259%7C0.776089678
&origin= https://localhost.asana.com:8180 &client_id=
&authuser
&authuser=0
&hl=en
&from_login=1
&as=-2ac32a9ddc775282

before an account is clicked, to looking like: https://accounts.google.com/o/oauth2/auth ?zt=ChRzUFJFWklyY0N5TjhxYXVwZFBoehIfb2hWV3BmSWFORlFjTXFUbUhqeVRGR013SFUwMWd3SQ%E2%88%99APsBz4gAAAAAUlSokO2bKw-DWW75kaZUVm_68SSZbc1u
&from_login=0
&hl=en
&as=-2ac32a9ddc775282

after an account is clicked.

_From [email protected] on October 09, 2013 14:11:44_

Thanks for the detailed repro steps.

Status: Accepted

_From [email protected] on December 20, 2013 05:16:01_

Testing again today this looks resolved for me.

_From [email protected] on December 25, 2013 05:53:51_

I've verified this is still happening on asana.com

_From [email protected] on December 26, 2013 13:30:13_

It worked correctly for 2-3 days then reverted. We had 6 independent verifications of the correct behaviour. I guess something was being tested...

Was this page helpful?
0 / 5 - 0 ratings