cannot read property 27getauthinstance 27 of undefined

Solutions on MaxInterview for cannot read property 27getauthinstance 27 of undefined by the best coders in the world

showing results for - "cannot read property 27getauthinstance 27 of undefined"
Giada
12 May 2016
1<html>
2<head>
3   <meta name="google-signin-client_id" content="YOUR_CLIENT_ID">
4</head>
5<body>
6  <script>
7    function signOut() {
8      var auth2 = gapi.auth2.getAuthInstance();
9      auth2.signOut().then(function () {
10        console.log('User signed out.');
11      });
12    }
13
14    function onLoad() {
15      gapi.load('auth2', function() {
16        gapi.auth2.init();
17      });
18    }
19  </script>
20  <a href="#" onclick="signOut();">Sign out</a>
21
22  <script src="https://apis.google.com/js/platform.js?onload=onLoad" async defer></script>
23</body>
24</html>