Skip to main content

Authentication Service

Purpose

mvp1-authentication-service is the backend service responsible for authentication-related flows.

Local runtime facts

  • default local port: 3001
  • swagger docs: /auth/docs
  • metrics endpoint: /auth/metrics
  • env template: .env.example

Owned modules

  • auth

Dependencies

  • MariaDB
  • Redis
  • RabbitMQ credentials are part of the template
  • JWT configuration

Required config groups

  • PORT
  • DB_*
  • TOKEN_EXPIRED_PER_SECONDS, JWT_ISSUER, JWT_ALGORITHM
  • REDIS_*
  • RABBITMQ_*

Upstream and downstream

  • upstream callers: intt-portal, intt-mobile, other backend services that need auth context
  • downstream systems: MariaDB, Redis, JWT token handling

Local commands

Install:

git submodule update --init --recursive
cd share-entity
git checkout development
cd ..
pnpm install

Run locally:

pnpm run start:dev

Build and run production mode:

pnpm run build
pnpm run start:prod

Test:

pnpm run test
pnpm run test:e2e
pnpm run test:cov

Local testing

  • unit tests: pnpm run test
  • e2e tests: pnpm run test:e2e
  • coverage: pnpm run test:cov

Typical use

Run this service whenever you need:

  • login
  • token exchange
  • permission or identity context for the portal or mobile client