Production authentication microservice with Node.js, Express, JWT, and Redis token management.
124
A containerized, production-ready authentication and authorization microservice built with Node.js, Express, JSON Web Tokens (JWT), and Redis. Designed to handle user identity verification, session persistence, secure password hashing, and token invalidation.
| Variable | Required | Default | Description |
|---|---|---|---|
PORT | No | 5000 | Port container listens on internally |
NODE_ENV | No | production | Runtime mode (production / development) |
JWT_SECRET | Yes | — | Secret key used to sign and verify access tokens |
REFRESH_TOKEN_SECRET | Yes | — | Secret key used for refresh token signing |
REDIS_HOST | Yes | redis | Hostname or IP of the Redis instance |
REDIS_PORT | No | 6379 | Port for the Redis connection |
MONGO_URI / DATABASE_URL | Yes | — | Primary database connection string for user credentials |
docker run -d \
--name auth-service \
-p 5000:5000 \
-e PORT=5000 \
-e NODE_ENV=production \
-e JWT_SECRET="your_jwt_secret" \
-e REDIS_HOST="auth_redis" \
-e REDIS_PORT=6379 \
70madmax07/authapi-auth-service:latest
Content type
Image
Digest
sha256:a6a107032…
Size
83 MB
Last updated
26 days ago
docker pull 70madmax07/authapi-auth-service