Kubessandra / react-google-calendar-api

An api to manage your google calendar
MIT License
215 stars 88 forks source link

Get token and refresh token #87

Open MatiasZelayaDept opened 2 years ago

MatiasZelayaDept commented 2 years ago

Hi ! Is any way to get the token and refresh token ? i dont see any method or variable to do it

Kubessandra commented 2 years ago

I think you can access it by using apiCalendar.tokenClient

https://developers.google.com/identity/oauth2/web/guides/use-token-model

MatiasZelayaDept commented 2 years ago

We dont have the token or refresh token there, i saw that the token we can get with gapi.client.getToken() but that is inside your code, if you can made a method to retrieve that it will be great, and the refresh token i didnt found how to get it

Kubessandra commented 2 years ago

You can do no ? apiCalendar.tokenClient.requestAccessToken({ prompt: 'consent' });