From the course: Angular: Creating and Hosting a Full-Stack Site

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Sign in and out

Sign in and out

From the course: Angular: Creating and Hosting a Full-Stack Site

Start my 1-month free trial

Sign in and out

- [Instructor] Okay, so now that we've added the basic Firebase off set up to both our front and backend, the next logical step is to allow our users to log in and log out. And the fact is that while all that setup we just went through was maybe a bit complicated, now that we have it all done, actually performing the authentication is almost laughably easy. In this video, we're going to see how to do that, as well as how to display some message when users aren't logged in, basically just a screen that says something like, hey, you need to log in first. So the first thing we're going to do is, we're going to open up our app component file. This is the component where we'll be letting users log in and out from. And up at the top here, we're going to say import AngularFireAuth. That's the package that we'll be using to log in with. From @angular/fire/auth. And then we're going to say import auth from firebase/app. And then…

Contents