From the course: AWS and React: Creating Full-Stack Apps

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Adding user auth to a React app

Adding user auth to a React app

- [Instructor] Okay, now that we've configured AWS through Amplify for authentication in our app, we can add that authentication into our app and actually allow users to create accounts and log in and log out. So first things first, we need to set up some things for our project, including we're going to use NPM to install some needed Amplify packages. We're going to import Amplify itself, some UI pieces and the AWS exports file. This is where Amplify has been storing the configuration for things like our Kognito user pool and so forth. Then using that, we're going to configure Amplify inside of our app. One of the things that we're going to import is the Authenticator. So we'll use that in our app to present to the user the ability to create their accounts. Log in, log out. It'll handle the functionality, and we'll have the UI pieces in there as well. So at the terminal, I'm going to start by using NPM to install some…

Contents