Fireship · @fireship
Flutter - Google SignIn from Scratch
Uploaded January 15, 2019 · Length 12:06
Summary
Implementing Google sign-in from scratch in Flutter using Firebase and Firestore.
- flutter google sign in
- firebase authentication
- flutter firestore
- google sign in from scratch
- firebase mobile app
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
[Music]
- 0:06
welcome to the first ever flutter video
- 0:08
on this channel today we'll start from
- 0:10
scratch and build a user authentication
- 0:12
system using firebase Google sign-in and
- 0:14
firestore the UI is nothing special but
- 0:17
this video is important because it will
- 0:18
show you how to handle real-time streams
- 0:20
of data from external sources and update
- 0:22
the UI reactively if you're new here
- 0:24
like and subscribe and you can grab the
- 0:26
full source code from fire ship IO I'd
- 0:28
like to start by saying that this video
- 0:30
is intermediate level so if you're brand
- 0:32
new to flutter it might seem a little
- 0:33
overwhelming but don't worry because
- 0:34
next week I have a more gentle
- 0:36
introduction plan that's specifically
- 0:37
for JavaScript and/or typescript
- 0:39
developers who are starting from scratch
- 0:41
so the first thing we'll do is run
- 0:43
flutter create from the command line to
- 0:45
create a new app we can then open up the
- 0:47
app in vs code and we'll have some
- 0:48
configuration to do for the platform's
- 0:50
we want to use in this case we'll only
- 0:52
be setting up Android but the iOS setup
- 0:54
is super easy so feel free to do that if
- 0:55
you're on a Mac from here we'll jump
- 0:58
into the firebase console click on the
- 0:59
Android button and then we'll need to
- 1:01
set a package ID for our project that
- 1:03
should be something like calm you're a
- 1:05
company name followed by the app name so
- 1:07
IO dot fire shipped lesson app in this
- 1:10
case the next thing we want to do is
- 1:12
generate a signing certificate
- 1:13
specifically for Google OAuth we can
- 1:16
generate it by copying and pasting this
- 1:17
command I'll link that in the full
- 1:18
lesson and then going to the terminal
- 1:20
and entering the command I'm not sure if
- 1:23
this is a problem on my end or if the
- 1:25
command is just outdated but it gives me
- 1:26
an error if I try to use export cert and
- 1:28
list together if it works for you then
- 1:31
that's great but if not you'll want to
- 1:33
go in here and take out the list from
- 1:35
the command and then when prompted for a
- 1:37
password type in Android and all
- 1:39
lowercase and finally copy and paste the
- 1:41
same command but this time delete export
- 1:43
cert from it that should give you an
- 1:45
sha-1 certificate that you can just copy
- 1:47
and paste in there and then click the
- 1:49
next step and that will give us our
- 1:51
Google services JSON file we can
- 1:53
download it and save it in the Android
- 1:55
app directory inside of our flutter
- 1:57
project now getting back to vs code
- 1:59
we'll go into that Android directory it


