Logging Out
In this lesson, we'll learn how to log the user out of the application.
We'll cover the following
At the moment, users can only log out by clearing the storage in the developer tools, which isn’t exactly the best way. It’d be much more convenient to create a link that they can click to log out.
In the previous lesson, we added a link to the menu for logging out. It already points to the /logout
path. Let’s take care of creating the page and logging the user out.
Signing out with Firebase
We’ll define a method that will take care of logging the user out in the authentication service. In the auth.service.ts
file, we’ll add a method called signOut
.
Get hands-on with 1400+ tech skills courses.