Add includeAuthorizationData parameter to gapi.auth2 GoogleUser.getAuthResponse

This commit is contained in:
Mitchell Wills
2017-02-03 11:02:29 -08:00
parent dba28e9608
commit f97b35d128
2 changed files with 7 additions and 1 deletions

View File

@@ -19,6 +19,12 @@ function test_getAuthInstance(){
var auth = gapi.auth2.getAuthInstance();
}
function test_getAuthResponse(){
var user = gapi.auth2.getAuthInstance().currentUser.get();
var authResponse = user.getAuthResponse();
var authResponseWithAuth = user.getAuthResponse(true);
}
function test_render(){
var success = (googleUser: gapi.auth2.GoogleUser): void => {
console.log(googleUser);

View File

@@ -151,7 +151,7 @@ declare namespace gapi.auth2 {
/**
* Get the response object from the user's auth session.
*/
getAuthResponse(): AuthResponse;
getAuthResponse(includeAuthorizationData?: boolean): AuthResponse;
/**
* Returns true if the user granted the specified scopes.