Check out a free preview of the full Firebase with React, v2 course:
The "Sign Out Solution" Lesson is part of the full, Firebase with React, v2 course featured in this preview video. Here's what you'd learn in this lesson:

Steve live codes the solution to the exercise.

Get Unlimited Access Now

Transcript from the "Sign Out Solution" Lesson

[00:00:00]
>> Steve Kinney: So our mission was to implement sign out. We saw before that it's a very complicated method that we need to execute. We have few options on where we choose to put this. I'm gonna choose to put it, for my own sanity, near where I put the sign in.

[00:00:21] So I could say something like,
>> Steve Kinney: auth.signOut, do I really need to do this? Probably not, I could just pull in the auth module and do it as well, but for my own organization I do that, and then on current user,
>> Steve Kinney: You're gonna find the Sign Out button.

[00:00:47] I'll say onClick,
>> Steve Kinney: We'll pull in that sign out method. Let's pull it in from our Local Firebase configuration. So now what I should be able to do is I should be able to sign in with Google.
>> Steve Kinney: I'm signed in. Once you hit the button, you should be able to sign out, right?

[00:01:18] That, in my experience, is the [SOUND] well, let's go with world's easiest implementation of authentication. Hit a switch, put in the provider into the sign in with pop up, the Google auth provider, hit sign out when we're done. We'll see in a little bit, we're gonna switch over to security rules after this.

[00:01:39] And start to lock down that database so that not just anyone can do anything to it. But then we'll actually look at what's involved in setting up an email, username, and password as well. That's just another method that we can configure along the way too, awesome.