Google-api-javascript-client: gapi.auth.authorized with response_type='id_token' broken

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

_From [email protected] on January 11, 2014 04:03:51_

What steps will reproduce the problem? If possible, provide a live demo of the issue. 1. open http://jsbin.com/uweBAyo/1 2. click on authorize

  1. The following error message is shown in the popup: Parameter not allowed for this message type: include_granted_scopes

This only happens for calls to gapi.auth.authorize with response_type set to 'id_token', which worked fine until recently. What is the expected output? What do you see instead? Authorization should succeed. What version of the product are you using? On what operating system? Irrelevant Please provide any additional information below. It works as expected when include_granted_scopes is removed the request parameters (for example by executing delete Sv.params.include_granted_scopes before Sv.callback = ... in the uglified client js client)

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

2–5 stars Priority-Medium bug imported

Most helpful comment

Just ran into this issue. Setting response_type: 'token id_token' fixed it for me.

All 3 comments

_From [email protected] on January 29, 2014 09:55:46_

Perhaps related, but a previously working app was failing to work after the initial authorization step. (Failure occurred on the second page load). I hacked this in:

gapi.auth.authorize({client_id: clientId, scope: scopes, immediate: true,
include_granted_scopes:false}, handleAuthResult);

and it started working again, sigh.

_From [email protected] on January 29, 2014 11:51:01_

@#1: yes, unfortunately include_granted_scopes:false does not work with response_type set to id_token. It's just ignored.

Just ran into this issue. Setting response_type: 'token id_token' fixed it for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mesqueeb picture mesqueeb  Â·  5Comments

Price775 picture Price775  Â·  3Comments

wonderfly picture wonderfly  Â·  3Comments

dominikstrasser picture dominikstrasser  Â·  4Comments

blmiles picture blmiles  Â·  5Comments