Unify auth and MCP servers into single modular codebase
- Merge auth-server and mcp-server into unified architecture under src/modules/ - Add configurable auth modes: internal (single process) and external (separate processes) - Update example scripts to support OAuth discovery and both auth modes - Consolidate OAuth documentation into comprehensive implementation guide - Add configuration options for development vs production deployments - Support both Redis-backed and in-memory session storage
This commit is contained in:
parent
22c7f7476b
commit
bc3619c73c
1 changed files with 3946 additions and 17945 deletions
38
.env.example
Normal file
38
.env.example
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Server Configuration
|
||||
PORT=3232
|
||||
BASE_URI=http://localhost:3232
|
||||
|
||||
# Auth Mode Configuration
|
||||
# Options: 'internal' or 'external'
|
||||
#
|
||||
# - internal: Run auth server in-process (suitable for demo/development)
|
||||
# `npm run dev:internal` starts the server in this mode.
|
||||
# This mode is the default when AUTH_MODE is not set.
|
||||
#
|
||||
# - external: Use external auth server (production pattern)
|
||||
# `npm run dev:external` starts the server in this mode,
|
||||
# and also starts the demo auth server
|
||||
#
|
||||
AUTH_MODE=internal
|
||||
|
||||
# External Auth Server URL (required if AUTH_MODE=external,
|
||||
# ignored if AUTH_MODE=internal)
|
||||
#
|
||||
# Examples:
|
||||
# - Demo auth server running locally: http://localhost:3001
|
||||
# - Auth0: https://your-tenant.auth0.com
|
||||
# - Okta: https://your-domain.okta.com
|
||||
#
|
||||
AUTH_SERVER_URL=http://localhost:3001
|
||||
|
||||
# Redis Configuration (optional)
|
||||
# If not provided, session management will use in-memory storage
|
||||
# (sessions will be lost on server restart)
|
||||
#
|
||||
REDIS_URL=redis://localhost:6379
|
||||
REDIS_TLS=0
|
||||
|
||||
# NODE_ENV controls Redis connection failure behavior:
|
||||
# - development: Continue running if Redis connection fails (with warning)
|
||||
# - production: Exit immediately if Redis connection fails
|
||||
NODE_ENV=development
|
||||
Loading…
Reference in a new issue