Authentication using Amazon Cognito and Node.js
What is Amazon Cognito
Amazon Cognito provides authentication, authorization, and user management for your web and mobile apps. This service was earlier used for mobile applications but now used for a variety of web applications as well. It does the same functionality as many other popular authentication frameworks like Auth0, Identity server, and JWT web tokens. But Cognito saves and synchronizes end-user data that enables an app developer to concentrate on writing code instead of managing the back-end. Before going more further let’s clarify two main concepts in AWS Cognito.
User pools vs Identity pools
Below are the definitions given by Amazon on both user pool and identity pool.
User pool
Amazon Cognito User Pool makes it easy for developers to add sign-up and sign-in functionality to web and mobile applications. It serves as your own identity provider to maintain a user directory. It supports user registration and sign-in, as well as provisioning identity tokens for signed-in users.
Identity pool
Amazon Cognito Federated Identities enables developers to create unique identities for your users and authenticate them with federated identity providers. With a federated identity, you can obtain…