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.

handleAuthClick() always returns undefined

See original GitHub issue

In docs, it says that handleAuthClick() returns a promise, but it does not. I need this so that after the user approves permission for the calendar, I can load all the events. Without it, I can’t know if permission is granted or not.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
noblessemcommented, Jul 19, 2022

If I’m not wrong, handleAuthClick() is now synchrone, so you don’t have the need to await it anymore, if not we can make a PR to make it as a promise and return.

I understand, but i have a case, when i click on “Create Event”, but while user trying to choose his account, other method createEvent trying to work and it is faileng cause it is no gapi, if i am getting it right. So i think it will be better to return smth in case, while user choose his account and then call other methods

|

0reactions
noblessemcommented, Jul 20, 2022

i am trying to modify somehow handleAuth method, but it is not seems to work properly

Read more comments on GitHub >

github_iconTop Results From Across the Web

gapi.client.getToken() always return null when refresh ...
So I am making a React app that accesses the user's Google calendar and fetch their events. It is working fine, but the...
Read more >
Javascript and REST, gapi.auth.getToken() always returns ...
I've been trying since 2 days to understand how to query the Calendar API. I would like to create a widget to replace...
Read more >
Migrate to Google Identity Services | Authorization
Note: Create a single reentrant function containing requestAccessToken() , call it when an access token is first needed, and later, after the existing...
Read more >
Google Drive API using Javascript - Bytutorial
getAuthInstance().isSignedIn.get()); }); } //check the return authentication of the login is successful, we display the drive box and hide ...
Read more >
Dynamic and Async Functionality in JAMstack - Morioh
A JAMstack site, at its core, is made up of prerendered files that are served ... { revokeAccess(); }); }); } function handleAuthClick()...
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