Installing Amplify UI in the project
Let's go to the project directory of the React app and add the Amplify UI dependencies to the project if you haven't done so.
For a ReactJS project, run the following command in the terminal:
yarn add aws-amplify @aws-amplify/ui-react
For an Expo or React Native project, run the following command in the terminal:
yarn add aws-amplify aws-amplify-react-native
The next step is to go to the specific project directory and call the amplify add auth
command in the terminal in order to set up Amplify UI authentication. We will use an email address as the username in this exercise:
amplify add auth Using service: Cognito, provided by: awscloudformation The current configured provider is Amazon Cognito. Do you want to use the default authentication and security configuration? Default configuration Warning: you will not be able to edit these selections. How do you want users to be able to sign in? Email Do you want to configure...