Oauth2 authentication server built on NodeJs, DynamoDb and Cognito
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
This is an example of how to list things you need to use the software and how to install them.
- yarn or npm
brew install yarn
# Run normally
$ yarn start
# Run the application with nodemon for development
$ yarn dev
# Test
$ yarn test # Run all test
$ yarn test:unit # Run only unit test
$ yarn test:integration # Run only integration test
# Test (Watch Mode for development)
$ yarn test:watch # Run all test with watch mode
$ yarn test:watch:unit # Run only unit test with watch mode
$ yarn test:watch:integration # Run only integration test with watch mode
# Test Coverage
$ yarn test:coverage # Calculate the coverage of all test
$ yarn test:coverage:unit # Calculate the coverage of unit test
$ yarn test:coverage:integration # Calculate the coverage of integration test
# Test consistent coding style (Lint)
$ yarn lint # Lint all sourcecode
$ yarn lint:app # Lint app sourcecode
$ yarn lint:test # Lint test sourcecode
$ yarn pack
All test for this boilerplate uses following tools.
I recommend using instructure's dynamo local with an admin page to manage the local dynamoDB instance
docker run -p 8000:8000 -it --rm instructure/dynamo-local-admin
Note that communication in transit to and from this app should be encrypted using TLS
All POST body contents are in application/json
format
POST /user
email
: New user emailpassword
: New user password
POST /user/verify
email
: User emailtoken
: Token created on user creation. This should be emailed to the user
POST /user/login
email
: User emailpassword
: User password
POST /user/password/forgot
email
: User email
POST /user/password/reset
email
: User emaillostToken
: Token created on forgot password. This should be emailed to the usernewPassword
: New password after reset
POST /user/password/change
email
: User emailpassword
: Old passwordnewPassword
: New password
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Based off danilop's LambdAuth
Started using posquit0's Koa Boilerplate
Your Name - @hazlanrozaimi - [email protected]
Project Link: https://github.com/dividezero/nodejs-dynamo-auth-server