From f97b35d128d900c9ab3aa0cb431b1517ea48881c Mon Sep 17 00:00:00 2001 From: Mitchell Wills Date: Fri, 3 Feb 2017 11:02:29 -0800 Subject: [PATCH] Add includeAuthorizationData parameter to gapi.auth2 GoogleUser.getAuthResponse --- gapi.auth2/gapi.auth2-tests.ts | 6 ++++++ gapi.auth2/index.d.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gapi.auth2/gapi.auth2-tests.ts b/gapi.auth2/gapi.auth2-tests.ts index a3ba839a36..2cfaa49980 100644 --- a/gapi.auth2/gapi.auth2-tests.ts +++ b/gapi.auth2/gapi.auth2-tests.ts @@ -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); diff --git a/gapi.auth2/index.d.ts b/gapi.auth2/index.d.ts index 593cae78d8..6037f0238e 100644 --- a/gapi.auth2/index.d.ts +++ b/gapi.auth2/index.d.ts @@ -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.