wanasit / google-calendar

Google Calendar API connection in Node.js
MIT License
230 stars 54 forks source link

Question: Can we skip the part where user has to authenticate with his gmail? #18

Closed anjali-chadha closed 8 years ago

anjali-chadha commented 9 years ago

Hello,

I want to create, edit or delete events from my web app without the user having to login. I should be able to handle my authentication on servr side may be? Any idea or example to explain this?

cellog commented 9 years ago

you have to use a server-side API token in your google developers console, which uses public key cryptography. That's outside the scope of this package, but can be done. This just needs the access token that google returns after successful auth

jonathanasquier commented 8 years ago

Hi, Can the server-side API token be used directly as access token? var google_calendar = new gcal.GoogleCalendar(accessToken); I've been using it for 6 month and I'm hitting API quota limits probably because every request is done using a single user's access/refresh tokens...

Thanks

jonathanasquier commented 8 years ago

FYI It works using this https://github.com/extrabacon/google-oauth-jwt#requesting-the-token-manually service account token.

wanasit commented 8 years ago

Sorry for my slow response. Yes, you need service account. https://developers.google.com/identity/protocols/OAuth2ServiceAccount#authorizingrequests

The google-oauth-jwt looks good too.