From the course: React: Cloud-Powered Apps with Firebase
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Authentication redirect
From the course: React: Cloud-Powered Apps with Firebase
Challenge: Authentication redirect
(electronic music) - [Instructor] I would now like you to work on a challenge. There's one pending issue in regards to our app. Let me show you what I mean. We are currently logged in. Let me copy this URL and then log out. I will go ahead and paste that URL and try to navigate to it. On pasting and go into this URL, we can see that we are still able to go to this route. Nothing is displayed here because there isn't a current authenticated user. However, we should prevent the user from being able to go to this route. There is a second underlying issue. Let's go ahead and log in. I will go ahead and grab this user ID. Let me log out and let me log in with a separate user. Now let's try to visit the profile page with another user ID. We can still visit the profile page with another ID in the route even though that user isn't logged in. It isn't a huge deal, as it would only display the logged in user. But a user…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Firebase Authentication setup3m 20s
-
Creating users6m 57s
-
(Locked)
Displaying current user7m 17s
-
(Locked)
Redirect user upon signup2m 30s
-
(Locked)
User logout3m 55s
-
(Locked)
User login4m 56s
-
(Locked)
Authenticated user redirect4m 38s
-
(Locked)
Challenge: Authentication redirect2m 30s
-
(Locked)
Solution: Authentication redirect2m 2s
-
-
-
-
-
-
-