Table of Contents
This project contains a passwordless authenticator app that was built using Amazon Cognito. Cognito provides the ability to define a custom auth flow. The auth flow process of the application uses one-time login codes that are sent via email. There are many benefits of using a one-time login codes such as :
- Prevents identity theft by making sure that a captured username/password pair cannot be used a second time
- Users do not need to worry about remembering their passwords
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
- Install the serverless framework CLI via NPM:
npm install -g serverless
- Install Amplify CLI via NPM:
npm install -g @aws-amplify/cli
The below steps explains how to install and set up the application.
- Clone the repo
git clone https://github.com/gjyoungjr/cognito_passwordless_auth
- Install NPM packages
npm install
- Enter your AWS Access Key ID and Secret Access Key in an env file
.env
AWS_ACCESS_KEY_ID=<ACCESS_KEY_ID> AWS_SECRET_ACCESS_KEY=<SECRET_ACCESS_KEY>
- Navigate to the web app directory
cd web-app/authenticator
- Initialize Amplify and enter your AWS Credentials (AWS Access Key ID & Secret Access Key). You can follow this guide to get more details regarding
setting up Amplify.
amplify init
- Deploy Stack to AWS
npm run deploy
Distributed under the MIT License. See LICENSE.txt
for more information.