Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

LetsStreamIt/auth-service

Repository files navigation

Authentication Service

CI status

License: MIT Version

Code Smells Vulnerabilities Duplicated Lines (%) Quality Gate Status Technical Debt Security Rating

Authentication service is responsible for managing user authentication to the LetsStreamIt platform. It manages user registration and login.

Technologies

Node.js Express jwt

Infrastructure

Docker

DevOps

GitHub Actions Semantic Release Semantic Versioning Conventional Commits Renovate SonarCloud

Documentation

Typedoc

Usage

It is possible to run the service locally or through a Docker container.

  1. To run the service locally:

    git clone https://github.com/LetsStreamIt/auth-service.git
    cd auth-service
    npm install
    npm run build && npm run start
  2. Using a Docker container:

    1. You can build the Docker image locally:

      docker build -t auth-service .
      docker run -p 3000:3000 auth-service
    2. Or you can pull the image from the GitHub Container Registry:

      docker pull ghcr.io/letsstreamit/auth-service:main
      docker run -p 3000:3000 ghcr.io/letsstreamit/auth-service:main

Configuration

If you want to change the default configuration, you can do so by creating a .env file in the root of the project.

The following variables can be set:

Variable Description Default
AUTH_SERVICE_PORT The port of the service 3000
JWT_SECRET The secret used to sign the JWT tokens testingsecret
PROFILE_SERVICE_HOSTNAME The hostname of the profile service localhost
PROFILE_SERVICE_PORT The port of the profile service 8080
MONGO_HOSTNAME The hostname of the MongoDB server localhost
MONGO_PORT The port of the MongoDB server 27017

The .env file should look like this:

AUTH_SERVICE_PORT=3000
JWT_SECRET=testingsecret
PROFILE_SERVICE_HOSTNAME=localhost
PROFILE_SERVICE_PORT=8080
MONGO_HOSTNAME=localhost
MONGO_PORT=27017

When running the service locally, the .env file is automatically loaded.

When running the service in a Docker container, you can pass the environment variables using the --env-file flag:

docker run --env-file .env -p 3000:3000 auth-service

API Documentation

The documentation and API reference can be found here.

Contributing

If you want to contribute to the project, please read the CONTRIBUTING.md file.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Authors

About

Authentication service for the LetsStreamIt web app

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors 5