https://github.com/ryands17/passwordless-auth
Allows a user to login directly via email without a need for entering passwords using Cognito
https://github.com/ryands17/passwordless-auth
cdk cognito lambda passwordless-authentication
Last synced: 6 months ago
JSON representation
Allows a user to login directly via email without a need for entering passwords using Cognito
- Host: GitHub
- URL: https://github.com/ryands17/passwordless-auth
- Owner: ryands17
- Created: 2021-07-31T15:05:26.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T02:56:31.000Z (almost 2 years ago)
- Last Synced: 2024-05-19T07:44:11.766Z (over 1 year ago)
- Topics: cdk, cognito, lambda, passwordless-authentication
- Language: TypeScript
- Homepage:
- Size: 642 KB
- Stars: 29
- Watchers: 3
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://dev.to/ryands17/magic-links-with-cognito-using-the-cdk-24a9) for the same.
The `cdk.json` file tells the CDK Toolkit how to execute your app.
## Prerequisites
- Install dependencies using `yarn`
- Rename `.example.env` to `.env` in `packages/backend` and replace the value in `SES_FROM_ADDRESS` to your verified email address in SES
- Rename `.example.env` to `.env` in `packages/frontend` and replace the value in `AWS_REGION` to the region your stack is deployed to. Default is `us-east-2`## Useful commands
### CDK
- `yarn workspace backend build` compile typescript to js
- `yarn workspace backend watch` watch for changes and compile
- `yarn workspace backend test` perform the jest unit tests
- `yarn workspace backend cdk deploy` deploy this stack to your default AWS account/region
- `yarn workspace backend cdk diff` compare deployed stack with current state
- `yarn workspace backend cdk synth` emits the synthesized CloudFormation template### Webapp
- `yarn workspace frontend dev` starts the dev server on [http://localhost:3000](http://localhost:3000)
- `yarn workspace frontend build` builds the app for production to the `build` folder
- `yarn workspace frontend test` launches the test runner in the interactive watch mode