From 6dfb4f5651ec05d401fd78232d2c1e745cd22ce4 Mon Sep 17 00:00:00 2001 From: energyhousedigital Date: Fri, 20 Feb 2015 15:30:35 +0000 Subject: [PATCH] Fixing #182 - Login Required error Change on line 69 fix the issue [#182](https://github.com/google/google-api-javascript-client/issues/182) --- samples/analytics/v3/auth_util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/analytics/v3/auth_util.js b/samples/analytics/v3/auth_util.js index 8b5fac4..8221565 100644 --- a/samples/analytics/v3/auth_util.js +++ b/samples/analytics/v3/auth_util.js @@ -66,7 +66,7 @@ function checkAuth() { * to their data. If it exists, the user has authorized access. */ function handleAuthResult(authResult) { - if (authResult) { + if (authResult && !authResult.error) { gapi.client.load('analytics', 'v3', handleAuthorized); } else { handleUnauthorized();