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

Challenge: Authentication redirect

From the course: React: Cloud-Powered Apps with Firebase

Start my 1-month free trial

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…

Contents