An authentication server written in NodeJS using JWT and storing data in DynamoDB
Create a .env
file to store sensitive info
JWT_secret = 'secretstring'
AWS_region = '...'
AWS_accessKeyId = 'XXXXXXXXXXXXXXXXXXXX'
AWS_secretAccessKey = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
GET test
curl -X GET \
-H 'Authorization: Bearer [token]' \
http://localhost:8000/v/1/test
GET register
curl --header "Content-Type: application/json" \
--request POST \
--data '{"password":"test123", "username":"user@example.com"}' \
http://localhost:8000/v/1/auth/register
POST login
curl --header "Content-Type: application/json" \
--request POST \
--data '{"password":"test123", "username":"user@example.com"}' \
http://localhost:8000/v/1/auth/login