From the course: React: Securing Applications
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Finalize menu with login - React.js Tutorial
From the course: React: Securing Applications
Finalize menu with login
- [Instructor] Okay, so the last thing that we need to do is update the navigation inside of our application, so we can actually log in and log out of our application. So let's go ahead and go into the Navigation file right here. So the first thing we're going to need to do is import a few things. So let's go ahead and import the special file that we have in here inside of that particular file here. So let's go ahead and do that. So I'm going to useAuth0 from react-auth0-spa, like so. And then what we'll do is start coding a few elements inside of our component. So let's go ahead and first use what we just imported, and I'm going to first open and close my curly braces, and then useAuth0, and this is a function, and then inside of our curly braces, I will deconstruct what I need. So the first one that I need is isAuthenticated. The second one is loginWithRedirect. And finally, logout. Once I have these, I'm able…
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
-
-
-
-
-
(Locked)
Initial setup of your server6m 59s
-
(Locked)
Create your API endpoints4m 5s
-
(Locked)
Initial Auth0 setup2m 38s
-
(Locked)
Adding the files and code from Auth03m 44s
-
(Locked)
Update index for Auth0 integration4m 2s
-
(Locked)
Add connections to server5m 46s
-
(Locked)
Finalize menu with login5m 54s
-
(Locked)
-
-