User Authentication using Angular, Amplify, and AWS Cognito Hosted UI — Part 1
Usage of AWS cloud services in web and mobile solutions have been rapidly growing in the recent past. Today, I will explain how we can develop a user authentication system for an Angular application using AWS Cognito Hosted UI and Amplify library in no time.
Step 1 — Creating a new Angular application.
First of all, you have to create a new angular application to test the authentication. For that, we can simply use commands provided in the Angular guide.
Enter the following commands in the terminal to create a new Angular app.
npm install -g @angular/cli
ng new my-app
Then you can go inside the my-app folder and run ng serve to check whether your app is working.
Step 2 — Installing Amplify CLI
Then we need to install Amplify CLI and configure it with the AWS account.
npm install -g @aws-amplify/cli
amplify configure
You will automatically be redirected to the AWS login window. After login with your credentials, go back to the terminal and press Enter to continue configuration. Then you will have to select a…