Amazon Cognito resources
Overview
Amazon Cognito allows developers to set up customer identity and access management (CIAM) capabilities, allowing users to sign-up, sign-in, and access customer-facing applications, web portals, or digital services for your organization.
Here you will find technical materials that describe how to accomplish a specific tasks with code samples you can re-use in your app. The first set of guides below teach you the essentials for Amazon Cognito user pools, Amazon Cognito identity pools, and AWS AppSync development.
Getting started
Workshop
Amazon Cognito Workshop
In this workshop, we will deep dive into Cognito and build out an authentication solution for a sample retail store. We will be working with Amazon Cognito user pools for API Authentication for a Hosted UI, Amazon Cognito user pools SDK with AWS Amplify, and the Amazon Cognito identity pools SDK.
Sample Applications
Sample pet store application
This sample web application demonstrates authentication and policy-based authorization of different user types to an imaginary pet store web application. This application uses Amazon Cognito for authentication and uses Amazon Verified Permissions for policy-based authorization, the application uses AWS Amplify platform to accelerate deployment and provisioning of backend resources.
Implement password-less authentication with Amazon Cognito
Password-less authentication improves security, reduces friction and provides better user experience for end-users of customer facing applications. Amazon Cognito provides features to implement custom authentication flows, which can be used to expand authentication factors for your application.
This solution demonstrates several patterns to support password-less authentication and provides reference implementations for these methods:
- FIDO2: AKA WebAuthn; sign in with Face, Touch, YubiKey, etc.
- Magic link sign-in: sign in with a one-time-use secret link that's emailed to you (and works across browsers).
- SMS-based step-up authentication: let an already signed-in user verify their identity again with a SMS One-Time-Password (OTP) without requiring them to type in their password.
The reference implementation of each of these authentication methods uses several AWS resources. This solution contains both CDK code (TypeScript) for the back end, as well as front-end code (TypeScript) to use in Web, React and React Native to help developers understand the building blocks needed and expand and adjust the solution as necessary.