🗝️ refactor: loadServiceKey to Support Stringified JSON and Env Var Renaming (#8317)

* feat: Enhance loadServiceKey to support stringified JSON input

* chore: Update GOOGLE_SERVICE_KEY_FILE_PATH to GOOGLE_SERVICE_KEY_FILE for consistency
This commit is contained in:
Danny Avila 2025-07-08 21:07:33 -04:00 committed by GitHub
parent e57fc83d40
commit 7e37211458
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 112 additions and 7 deletions

View file

@ -22,8 +22,7 @@ async function loadAsyncEndpoints(req) {
} else {
/** Only attempt to load service key if GOOGLE_KEY is not provided */
const serviceKeyPath =
process.env.GOOGLE_SERVICE_KEY_FILE_PATH ||
path.join(__dirname, '../../..', 'data', 'auth.json');
process.env.GOOGLE_SERVICE_KEY_FILE || path.join(__dirname, '../../..', 'data', 'auth.json');
try {
serviceKey = await loadServiceKey(serviceKeyPath);