Authentication Persistence
In this lesson, we'll learn how to persist the authentication after a user has logged in.
We'll cover the following
At the moment, we’re able to create a new account and login. We’re going to tie up some loose ends and add some finishing touches. There are a couple of problems with the current implementation.
The biggest issue is not being able to keep track of the user who’s logged in. We also need to ensure that the user will still be logged in if the page gets refreshed. Otherwise, they’ll be forced to login when they’re already authenticated into the system.
Understanding authentication
Luckily, Firebase already keeps track of this information for us. In an earlier lesson, I advised you to clear the storage if you wanted to test the registration form multiple times. This is because Firebase stores a token in your browser’s storage.
Get hands-on with 1400+ tech skills courses.