Firebase and Google Calendar

4,158 views
Skip to first unread message

Steven Ferrarese

unread,
Feb 10, 2017, 9:15:25 PM2/10/17
to Firebase Google Group
So  I have been asked to make an app for my town, and the one problem I am having is trying to figure out how to get events off of the towns calendar and schools calendar, and put it into one on the app.  I understand that I can just update my firebase database with the events and read them into the app that way.  But is there a way to have the firebase database read data off the a google calendar and put it in the database and structure it. Or have the app read in data from the google calendar? 

Thanks in advance !
Steven F

Doug Stevenson

unread,
Feb 11, 2017, 10:01:55 PM2/11/17
to Firebase Google Group
Steven,

Firebase won't be of direct help you to.  Have you explored the Google Calendar APIs?  You have several options to access calendar data.  https://developers.google.com/google-apps/calendar/

Doug

Jacob Boswell

unread,
Feb 15, 2017, 10:55:22 AM2/15/17
to Firebase Google Group
I am doing something very similar, I am trying to authenticate with firebase and then connect to the calendar API. Unfortunately there is a significant problem that I haven't found an answer to yet. The problem is with the access_token. When login to firebase using Google credentials, it gives you back the google access_token, which is great. Unfortunately, that token only last for an hour and you're NOT given a refresh token, which means while your app is still authenticated against firebase after an hour you can no longer access the google apis without forcing the user to login again.

After much searching I have not found any great solution to this. If you're interested, I'll post a solution when/if I find one. 

Doug Stevenson

unread,
Feb 15, 2017, 2:09:41 PM2/15/17
to fireba...@googlegroups.com
Jacob,

The Firebase SDK will automatically refresh that token as needed.  Have you using the most recent every time, rather than holding on to the one you get first?  A token refresh is one of the conditions that causes an AuthStateListener to trigger - you might want to capture it every it indicates a user is logged in.

Doug


--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/fTlbYH5uTGY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/8b933a79-3ee7-499a-bb4c-ee31aea66004%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jacob Wenger

unread,
Feb 15, 2017, 2:41:47 PM2/15/17
to fireba...@googlegroups.com
Actually, Jacob (not me, the other Jacob) and Doug are referring to different tokens here. The Firebase SDKs will automatically refresh Firebase ID tokens, but not Google access tokens. There is no way to currently do this with the current SDKs that I am aware of, unless you roll your own Google OAuth flow using custom authentication.

The Firebase Auth team is aware of this limitation and has longterm plans to address it. I'll forward this thread on to them so they know users like yourself would like to see it happen.

Cheers,
Jacob

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Avinash Pinto

unread,
Feb 18, 2021, 5:10:52 AM2/18/21
to Firebase Google Group
Hi All,

I am currently facing the same issue - has this been resolved at all? Can I use standard firebase google login? or if there is a custom solution to this - I am using Kotlin and trying to implement for an Android app

Thanks

On Thursday, 16 February 2017 at 01:11:47 UTC+5:30 Jacob Wenger wrote:
Actually, Jacob (not me, the other Jacob) and Doug are referring to different tokens here. The Firebase SDKs will automatically refresh Firebase ID tokens, but not Google access tokens. There is no way to currently do this with the current SDKs that I am aware of, unless you roll your own Google OAuth flow using custom authentication.

The Firebase Auth team is aware of this limitation and has longterm plans to address it. I'll forward this thread on to them so they know users like yourself would like to see it happen.

Cheers,
Jacob

On Wed, Feb 15, 2017 at 11:09 AM, 'Doug Stevenson' via Firebase Google Group <fireba...@googlegroups.com> wrote:
Jacob,

The Firebase SDK will automatically refresh that token as needed.  Have you using the most recent every time, rather than holding on to the one you get first?  A token refresh is one of the conditions that causes an AuthStateListener to trigger - you might want to capture it every it indicates a user is logged in.

Doug

On Tue, Feb 14, 2017 at 1:29 PM, Jacob Boswell <ja...@s56.net> wrote:
I am doing something very similar, I am trying to authenticate with firebase and then connect to the calendar API. Unfortunately there is a significant problem that I haven't found an answer to yet. The problem is with the access_token. When login to firebase using Google credentials, it gives you back the google access_token, which is great. Unfortunately, that token only last for an hour and you're NOT given a refresh token, which means while your app is still authenticated against firebase after an hour you can no longer access the google apis without forcing the user to login again.

After much searching I have not found any great solution to this. If you're interested, I'll post a solution when/if I find one. 


On Friday, February 10, 2017 at 7:15:25 PM UTC-7, Steven Ferrarese wrote:
So  I have been asked to make an app for my town, and the one problem I am having is trying to figure out how to get events off of the towns calendar and schools calendar, and put it into one on the app.  I understand that I can just update my firebase database with the events and read them into the app that way.  But is there a way to have the firebase database read data off the a google calendar and put it in the database and structure it. Or have the app read in data from the google calendar? 

Thanks in advance !
Steven F

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/fTlbYH5uTGY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/8b933a79-3ee7-499a-bb4c-ee31aea66004%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages