All checks were successful
Test Asgard Runner / test (push) Successful in 2s
The refresh endpoint only returned access_token, causing the frontend to set refreshToken=undefined after first refresh — breaking the entire token chain. Now returns both tokens (rotating refresh). Access token default bumped from 15min to 4h (14400s) for practical server setup sessions. Also fixed empty license_key for super admin via DB update. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
export default () => ({
|
|
port: parseInt(process.env.API_PORT || '3000', 10),
|
|
database: {
|
|
url: process.env.DATABASE_URL || 'postgres://corrosion:corrosion_dev@localhost:5432/corrosion',
|
|
maxConnections: parseInt(process.env.DATABASE_MAX_CONNECTIONS || '20', 10),
|
|
},
|
|
nats: {
|
|
url: process.env.NATS_URL || 'nats://localhost:4222',
|
|
},
|
|
jwt: {
|
|
secret: process.env.JWT_SECRET || 'change-me',
|
|
accessExpirySeconds: parseInt(process.env.JWT_ACCESS_EXPIRY_SECONDS || '14400', 10),
|
|
refreshExpirySeconds: parseInt(process.env.JWT_REFRESH_EXPIRY_SECONDS || '604800', 10),
|
|
},
|
|
encryption: {
|
|
key: process.env.ENCRYPTION_KEY || '',
|
|
},
|
|
admin: {
|
|
email: process.env.ADMIN_EMAIL || '',
|
|
password: process.env.ADMIN_PASSWORD || '',
|
|
username: process.env.ADMIN_USERNAME || 'Commander',
|
|
licenseKey: process.env.ADMIN_LICENSE_KEY || '',
|
|
},
|
|
cloudflare: {
|
|
apiToken: process.env.CLOUDFLARE_API_TOKEN || '',
|
|
zoneId: process.env.CLOUDFLARE_ZONE_ID || '',
|
|
baseDomain: process.env.BASE_DOMAIN || 'corrosionmgmt.com',
|
|
},
|
|
steam: {
|
|
apiKey: process.env.STEAM_API_KEY || '',
|
|
},
|
|
smtp: {
|
|
host: process.env.SMTP_HOST || '',
|
|
port: parseInt(process.env.SMTP_PORT || '587', 10),
|
|
username: process.env.SMTP_USERNAME || '',
|
|
password: process.env.SMTP_PASSWORD || '',
|
|
from: process.env.SMTP_FROM || 'noreply@corrosionmgmt.com',
|
|
},
|
|
frontend: {
|
|
url: process.env.FRONTEND_URL || 'http://localhost:5174',
|
|
},
|
|
});
|