Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication issue with MSIE 8 and scopeS #42

Closed
wonderfly opened this issue Jan 7, 2015 · 4 comments
Closed

Authentication issue with MSIE 8 and scopeS #42

wonderfly opened this issue Jan 7, 2015 · 4 comments

Comments

@wonderfly
Copy link
Contributor

From 0xED....@gmail.com on July 24, 2012 12:14:36

What steps will reproduce the problem?

  1. use the [authSample script] https://code.google.com/p/google-api-javascript-client/source/browse/samples/authSample.html ;
  2. set multiple scopes instead of ' https://www.googleapis.com/auth/plus.me'; for example:
    var scopes = [
    ' https://www.googleapis.com/auth/drive.file' ,
    ' https://www.googleapis.com/auth/userinfo.email' ,
    ' https://www.googleapis.com/auth/userinfo.profile' ];
  3. Save, Run and Click the "Authorize" button.

What is the expected output?

  1. An optional sign in
  2. A pop-up window describing the requested authorizations

What do you see instead?

  1. A blank pop-up window
  2. Displaying the source shows a html What version of the product are you using? On what operating system? Drive v2, oAuth v2, MSIE 8 / Windows 7 Please provide any additional information below. 1. To be honest, this works fine with Chrome and Firefox.
  3. -key (MSIE Developer Tools) didn't help me

Original issue: http://code.google.com/p/google-api-javascript-client/issues/detail?id=42

@wonderfly
Copy link
Contributor Author

From mpatri...@gmail.com on July 26, 2012 11:11:16

I have this similar issue when using IE9.

  1. Call is made: https://apis.google.com/js/client.js?onload=handleClientLoad 2. handleClientLoad JS function triggered:
    function handleClientLoad() {
    gapi.client.setApiKey(apiKey);
    window.setTimeout(checkAuth, 1);
    }
  2. checkAuth JS function is triggered:
    function checkAuth() {
    gapi.auth.authorize({
    client_id: clientId, scope: scopes, immediate: true
    }, handleAuthResult);
    }
  3. handleAuthResult(authResult) JS function is triggered

When the handleAuthResult is triggered, the 'authResult' parameter should have data in it; however, this is not the case when running IE9. The 'authResult' ends up being null. If gapi.auth.authorize is called with 'immediate' set to false, blank window pops up.

@wonderfly
Copy link
Contributor Author

From obr...@google.com on July 30, 2012 10:42:13

Technically scopes should be a string, not an array. Can you try passing a space-delimited string specifying your scopes?

Status: Accepted
Owner: obr...@google.com

@wonderfly
Copy link
Contributor Author

From 0xED....@gmail.com on July 30, 2012 12:23:10

Technically, the array does work with ff and chrome.
Technically, it's really basic to check - can't understand why you did not try.

  1. Any way, I did the following change,
    changed:
    var scopes = [
    ' https://www.googleapis.com/auth/drive.file' ,
    ' https://www.googleapis.com/auth/userinfo.email' ,
    ' https://www.googleapis.com/auth/userinfo.profile' ];
    to
    var scopes =
    ' https://www.googleapis.com/auth/drive.file '+
    ' https://www.googleapis.com/auth/userinfo.email '+
    ' https://www.googleapis.com/auth/userinfo.profile' ;
    Did not work.
    Then I reverted my changes.

Guess what: now, it does work under Chrome and FF and MSIE.

Seems to have been magically fixed :-\

-- Pierre
"The only limiting factor of the Linux operating system is its user."
(Linus Torvalds)

@wonderfly
Copy link
Contributor Author

From obr...@google.com on July 30, 2012 12:32:42

Status: NotReproducible

@wonderfly wonderfly removed their assignment Jan 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant