Service for authentication.
This service provides:
- User registration
- User authentication via email and password
- Token verification
- Password reset
├── index.js
├── src
│ ├── infrastructure
│ │ ├── db
│ │ │ └── UserSchema.js
│ │ ├── routes
│ │ │ └── Auth.js
│ │ └── security
│ │ └── JwtGenerator.js
│ ├── persistence
│ │ └── repositories
│ │ └── UserRepositoryMongo.js
│ ├── application
│ │ ├── controllers
│ │ │ └── AuthController.js
│ │ ├──serializers
│ │ │ └── UserSerializer.js
│ │ └── useCases
│ │ ├── Authenticate.js
│ │ └── Register.js
│ └── domain
│ ├──UserEntity.js
│ └── UserRepository.js
├── monitoring
├── deploy
└── tests
- NodeJS
- Express (as web framework for NodeJS applications)
- MongoDB (as NoSQL database)
- Docker
- Docker-compose
To run this application you need to define the following environment variables:
JWT_SECRET_KEY=YOUR_SECRET_KEY
AUTH_APIKEY=YOUR_AUTH_SERVICE_APIKEY
USER=EMAIL_ADDRESS_SENDER #for password recovery
PASS=EMAIL_PASSWORD_SENDER #for password recovery
SERVICE=EMAIL_SERVICE
PASSWORD_RESET_URL=PASSWORD_RESET_URL
docker-compose up -d --build
This command deploys the services:
authservice_node
: Web Servicemongo
: Databasemongo-express
: Database admin
docker-compose stop
You can try it out at https://staging-auth-service-app-v2.herokuapp.com/api-docs