Registering users also logs them in, so you'll need to create a simple function that locks users out in this video. This is surprisingly easy to do with Firebase.
- [Instructor] It's time to program logging out…of our application, so it's going to be pretty simple.…But there's going to be a few places…that we have to correct in here.…So, first of all, I'm going to go and create…this new logout user method here in this App.js file.…So I've got this registerUser method,…and I'm going to add one called logoutUser.…And it's going to receive an event,…and we're going to put that event in its own function here.…
What we'll do is prevent the default behavior.…So this'll be sort of interesting…because normally you may handle this…in the component register that it belongs with.…So, here whenever something changes,…we execute this handleChange.…We capture the event, and then we do stuff with it.…Same thing for Submit.…We sort of the capture the event…and sometimes we pass something along to the main component.…But in here, logging out can happen…either from this component, Welcome component here…or this navigation component.…
Or there would be somewhere else you need to call it from.…
- Integrating Firebase
- Managing state in forms
- Registering users
- Logging users in and out
- Creating, editing, and deleting records from Firebase
- Filtering and searching data
Skill Level Intermediate
1. Getting Started
2. Routing and Connecting to a Database
3. Registering and Logging In Users
4. Working with Firebase Data
5. Working with Attendees
6. Filtering and Searching
Next steps1m 22s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.