Fireship · @fireship
Google Calendar + Firebase Auth
Uploaded September 24, 2018 · Length 9:55
Summary
Learn how to use Google Calendar API with Firebase Auth, expanding Firebase's limited API access to virtually any other Google API.
- google calendar api
- firebase auth
- google api integration
- angularfire
- google services library
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
[Music]
- 0:05
there are literally hundreds of
- 0:07
different api's available under the
- 0:09
Google umbrella things like Drive
- 0:11
calendar Google cloud platform maps and
- 0:14
YouTube just to name a few but when you
- 0:16
log in a user on firebase you only get
- 0:18
access to a limited set of read-only
- 0:19
data like their Google+ profile in
- 0:22
today's video you'll learn how to work
- 0:23
with the Google Calendar API on the
- 0:25
behalf of a user but more importantly
- 0:27
you'll learn how to expand the scope of
- 0:29
firebase auth to work with virtually any
- 0:31
other Google API if you're new here like
- 0:33
and subscribe and there will be a
- 0:34
one-of-a-kind shirt giveaway with this
- 0:36
video all you have to do is leave a
- 0:37
comment below letting me know which
- 0:39
Google API you want to see covered next
- 0:40
and I'll randomly pick a winner via
- 0:42
livestream tomorrow let's start things
- 0:45
off by taking a look at what we're
- 0:46
actually building today it's currently
- 0:48
Saturday night and I don't have anything
- 0:50
additional on my calendar for today but
- 0:52
if we skip ahead to Monday you'll see
- 0:53
that I have a handful of appointments
- 0:55
the goal of this lesson is for you to be
- 0:57
able to log in a user with firebase and
- 0:59
then programmatically update or read
- 1:02
items in the calendar the inspiration
- 1:04
for this video comes from a real-life
- 1:05
tour operator based in New York City
- 1:07
after they sign up they need to build
- 1:09
out a complex itinerary for their trip
- 1:11
now there's actually a couple different
- 1:12
ways you can go about this but I'm going
- 1:14
to show you the approach that I think is
- 1:15
most developer friendly and flexible as
- 1:17
you can see here when we log in it looks
- 1:20
exactly like we're logging in with
- 1:21
firebase and the Google auth provider
- 1:23
but that's actually not what happened
- 1:25
instead we use the Google services
- 1:27
JavaScript library to sign in that gave
- 1:29
us a JSON web token that we could then
- 1:31
pass off to firebase to login as a
- 1:34
firebase user the reason we do this is
- 1:36
because we're going to use the Google
- 1:38
services library to make API requests to
- 1:40
the calendar API and it will
- 1:42
automatically manage our access tokens
- 1:44
so we can do everything from the
- 1:45
front-end then once we're logged in we
- 1:48
can retrieve this user it's Google
- 1:49
Calendar by simply making a call to that
- 1:51
API so the data we're looking at here in
- 1:54
the UI are actual events from my Google
- 1:56
Calendar in addition to reading the data
- 1:58
we can also create update and delete


