This is a client web app that provides custom passwordless sign-up and sign-in pages to authenticate against an Amazon Cognito user pool via custom authentication challenge flow with Lambda triggers.
- Download and install Node.js
- Deploy backend via the AWS Serverless Application Repository as described in /backend
Once the backend is deployed, run the web client to demonstrate the passwordless authentication flow via SMS.
- Clone this repo
git clone https://github.com/mobilequickie/amplify-passwordless-sms-auth.git
- Enter webClient directory:
cd webClient/angular/
- Install dependencies:
npm install
- Enter your AWS region, Cognito user pool ID and your Web App Client ID in this file:
src/environments/environment.ts
. You can get this information from the CloudFormation stack outputs of the serverless repo deployment. - Run the web app locally:
npm run start
The web app client should be running at http://localhost:4200 allowing you to register a new user with full name and phone number and login with only the registered phone number.
Once you have it running locally and tested, you can deploy this directly to AWS Amplify Console:
This sample code is made available under a modified MIT license. See the LICENSE file.