react-google-calendar-api icon indicating copy to clipboard operation
react-google-calendar-api copied to clipboard

handleAuthClick() always returns undefined

Open M1ck0 opened this issue 2 years ago • 5 comments

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.

M1ck0 avatar Jul 06 '22 08:07 M1ck0

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.

Hey bro, how u resolved this issues,cause if i getting it right handleAuthClick is not a promise anymore and i cant await for it

noblessem avatar Jul 19 '22 13:07 noblessem

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.

Kubessandra avatar Jul 19 '22 14:07 Kubessandra

Hey bro, how u resolved this issues,cause if i getting it right handleAuthClick is not a promise anymore and i cant await for it

No I did not. I decided to use Google's API for this task as I needed some features that this package did not have.

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 need to await it but it does not return anything. I also tried without await, still nothing.

M1ck0 avatar Jul 19 '22 14:07 M1ck0

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

|

noblessem avatar Jul 19 '22 14:07 noblessem

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

noblessem avatar Jul 20 '22 10:07 noblessem