fix tls and key secrets

This commit is contained in:
2026-02-25 21:17:00 -06:00
parent 97b6c45bc0
commit 3779cdc379
4 changed files with 13 additions and 6 deletions
+7 -5
View File
@@ -26,21 +26,23 @@ export const refreshTokenDuration = "30d";
const isProduction = process.env.NODE_ENV === "production";
const readKeyFile = (path: string) => readFileSync(path).toString();
export const accessTokenPrivateKey = isProduction
? process.env.ACCESS_TOKEN_PRIVATE_KEY!
: readFileSync(`.accessToken.key`).toString();
: readKeyFile(`.accessToken.key`);
export const refreshTokenPrivateKey = isProduction
? process.env.REFRESH_TOKEN_PRIVATE_KEY!
: readFileSync(`.refreshToken.key`).toString();
: readKeyFile(`.refreshToken.key`);
export const permissionsPrivateKey = isProduction
? process.env.PERMISSIONS_PRIVATE_KEY!
: readFileSync(`.permissions.key`).toString();
: readKeyFile(`.permissions.key`);
export const secureValuesPrivateKey = isProduction
? process.env.SECURE_VALUES_PRIVATE_KEY!
: readFileSync(`.secureValues.key`).toString();
: readKeyFile(`.secureValues.key`);
export const secureValuesPublicKey = isProduction
? process.env.SECURE_VALUES_PUBLIC_KEY!
: readFileSync(`public-keys/.secureValues.pub`).toString();
: readKeyFile(`public-keys/.secureValues.pub`);
// Microsoft Auth Constants
const msalConfig: msal.Configuration = {