* feat: env variable added in infra-config for smtp enable status * feat: event emitter added * feat: added advance mailer configurations from infra config * test: fix test cases * feat: added query to see is smtp enabled or not * feat: email auth provider disabled on smtp disable * chore: restrict on update directly instead of dedicated mutation * fix: feedback resolved * chore: modify mailer module * chore: error handle in mailer functions * chore: removed unused imports * chore: remove event-emit * chore: update env example * test: fix broken test cases * chore: feedback resolved * chore: isSMTPEnabled moved to infra config resolver * fix: email can not reenable if smtp not enabled
76 lines
2.6 KiB
Plaintext
76 lines
2.6 KiB
Plaintext
#-----------------------Backend Config------------------------------#
|
|
# Prisma Config
|
|
DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
|
|
|
|
# Auth Tokens Config
|
|
JWT_SECRET="secret1233"
|
|
TOKEN_SALT_COMPLEXITY=10
|
|
MAGIC_LINK_TOKEN_VALIDITY= 3
|
|
REFRESH_TOKEN_VALIDITY="604800000" # Default validity is 7 days (604800000 ms) in ms
|
|
ACCESS_TOKEN_VALIDITY="86400000" # Default validity is 1 day (86400000 ms) in ms
|
|
SESSION_SECRET='add some secret here'
|
|
|
|
# Hoppscotch App Domain Config
|
|
REDIRECT_URL="http://localhost:3000"
|
|
WHITELISTED_ORIGINS="http://localhost:3170,http://localhost:3000,http://localhost:3100"
|
|
VITE_ALLOWED_AUTH_PROVIDERS=GOOGLE,GITHUB,MICROSOFT,EMAIL
|
|
|
|
# Google Auth Config
|
|
GOOGLE_CLIENT_ID="************************************************"
|
|
GOOGLE_CLIENT_SECRET="************************************************"
|
|
GOOGLE_CALLBACK_URL="http://localhost:3170/v1/auth/google/callback"
|
|
GOOGLE_SCOPE="email,profile"
|
|
|
|
# Github Auth Config
|
|
GITHUB_CLIENT_ID="************************************************"
|
|
GITHUB_CLIENT_SECRET="************************************************"
|
|
GITHUB_CALLBACK_URL="http://localhost:3170/v1/auth/github/callback"
|
|
GITHUB_SCOPE="user:email"
|
|
|
|
# Microsoft Auth Config
|
|
MICROSOFT_CLIENT_ID="************************************************"
|
|
MICROSOFT_CLIENT_SECRET="************************************************"
|
|
MICROSOFT_CALLBACK_URL="http://localhost:3170/v1/auth/microsoft/callback"
|
|
MICROSOFT_SCOPE="user.read"
|
|
MICROSOFT_TENANT="common"
|
|
|
|
# Mailer config
|
|
MAILER_SMTP_ENABLE="true"
|
|
MAILER_USE_CUSTOM_CONFIGS="false"
|
|
MAILER_ADDRESS_FROM='"From Name Here" <from@example.com>'
|
|
|
|
MAILER_SMTP_URL="smtps://user@domain.com:pass@smtp.domain.com" # used if custom mailer configs is false
|
|
|
|
# The following are used if custom mailer configs is true
|
|
MAILER_SMTP_HOST="smtp.domain.com"
|
|
MAILER_SMTP_PORT="587"
|
|
MAILER_SMTP_SECURE="true"
|
|
MAILER_SMTP_USER="user@domain.com"
|
|
MAILER_SMTP_PASSWORD="pass"
|
|
MAILER_TLS_REJECT_UNAUTHORIZED="true"
|
|
|
|
# Rate Limit Config
|
|
RATE_LIMIT_TTL=60 # In seconds
|
|
RATE_LIMIT_MAX=100 # Max requests per IP
|
|
|
|
|
|
#-----------------------Frontend Config------------------------------#
|
|
|
|
|
|
# Base URLs
|
|
VITE_BASE_URL=http://localhost:3000
|
|
VITE_SHORTCODE_BASE_URL=http://localhost:3000
|
|
VITE_ADMIN_URL=http://localhost:3100
|
|
|
|
# Backend URLs
|
|
VITE_BACKEND_GQL_URL=http://localhost:3170/graphql
|
|
VITE_BACKEND_WS_URL=ws://localhost:3170/graphql
|
|
VITE_BACKEND_API_URL=http://localhost:3170/v1
|
|
|
|
# Terms Of Service And Privacy Policy Links (Optional)
|
|
VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms
|
|
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy
|
|
|
|
# Set to `true` for subpath based access
|
|
ENABLE_SUBPATH_BASED_ACCESS=false
|