passwordless-auth
passwordless-auth copied to clipboard
Allows a user to login directly via email without a need for entering passwords using Cognito
Passwordless Auth
This stack allows a user to login directly via email without any need for a pasword. This uses Cognito for authentication along with Lambda triggers. Here's the blog post for the same.
The cdk.json file tells the CDK Toolkit how to execute your app.
Prerequisites
- Install dependencies using
yarn - Rename
.example.envto.envinpackages/backendand replace the value inSES_FROM_ADDRESSto your verified email address in SES - Rename
.example.envto.envinpackages/frontendand replace the value inAWS_REGIONto the region your stack is deployed to. Default isus-east-2
Useful commands
CDK
yarn workspace backend buildcompile typescript to jsyarn workspace backend watchwatch for changes and compileyarn workspace backend testperform the jest unit testsyarn workspace backend cdk deploydeploy this stack to your default AWS account/regionyarn workspace backend cdk diffcompare deployed stack with current stateyarn workspace backend cdk synthemits the synthesized CloudFormation template
Webapp
yarn workspace frontend devstarts the dev server on http://localhost:3000yarn workspace frontend buildbuilds the app for production to thebuildfolderyarn workspace frontend testlaunches the test runner in the interactive watch mode