This repo is part of the tiny project/demo/portfolio for a Super Simple Book Lending App.
It is responsible for managing the creation of new users (register) and authentication of existing ones (login).
For the register part, it is as simple as AWS APIs in Lambda (using Serverless framework) with DynamoDb tables and a hash cryptography for saving secure passwords.
For the login part, it uses JWT (see https://jwt.io/) for the next APIs calls that will require any authorization, and it's also made in Serverless (AWS).
Assuming you have an AWS account and have installed Serverless, the following steps will explain how to have this project on your machine and install it in the cloud.
- Clone this repo
- Open the
serverless.yml
file and create a JWT_SECRET (you can create one at https://www.grc.com/passwords.htm) - Still in the
serverless.yml
file, change the profile to yours, but if you don't have one you can probably delete this line to get the default settings - Run
serverless deploy
and wait to finish
- Run
serverless remove
, this will delete all stack created in AWS by Serverless except the DynamoDB table book-lending-app-user (because it has the DetentionPolicy set at the yml file). - You can manually delete the DynamoDB table at your AWS account.