Skip to content

edwilliams/NodeAuthServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Auth Server

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'

API ref

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

About

An authentication server written in NodeJS using JWT and storing data in DynamoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published