question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

this.$gapi.isAuthenticated() is returning true even after logout

See original GitHub issue
 onDriveLogoutClick: function() {
      this.$gapi.getGapiClient().then(gapi => {
        gapi.auth2
          .getAuthInstance()
          .signOut()
          .then(() => {
            this.gDriveAuthenticated = false;
            console.log("Drive logout successful");
          })
          .catch(err => {
            // eslint-disable-next-line no-console
            console.error("Login call failed: %s", err.message);
          });
      });
    }

Even after logout(above code) console.log("isAuth:" + this.$gapi.isAuthenticated());

this is giving true

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cedpoillycommented, Jul 8, 2020

@apgapg Thanks. I will update the documentation. Give us some time 🙂

1reaction
apgapgcommented, Jul 8, 2020

Okay this means this lib also stores its own local data to check for login status? I thought the two methods are same ie this.$gapi.logout() & gapi.auth2.getAuthInstance().signOut() Can you please update README? It gives the methods are deprecated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

isAuthenticated not updated after logout - Auth0 Community
Hello, I have a component in react that I conditionally render based off isAuthenticated. This works when the app firsts load, ...
Read more >
c# - Page.User.Identity.IsAuthenticated still true after ...
The master page displays the 'log out' link in the top right of the screen and it displays it on the condition that...
Read more >
Google Sign-In JavaScript client reference | Authentication
Returns the GoogleAuth object. You must initialize the GoogleAuth object with gapi.auth2.init() before calling this method. Returns.
Read more >
isAuthenticated and user are null after login · Issue #93 - GitHub
After logging in the application isAuthenticated is still false and user is ... logout } = useAuth0(); console.log(isAuthenticated); return ...
Read more >
Authentication - Advanced workflows - JavaScript - Amplify Docs
federatedSignIn() to get AWS credentials directly from Cognito Federated Identities and not use User Pool federation. If you have logged in with Auth....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found