From f999ad1615f4060d1946771054a26974ef34d940 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 16 Apr 2024 12:10:38 +0200 Subject: [PATCH] auth-backend-module-azure-easyauth-provider: review fixes Signed-off-by: Patrik Oldsberg --- .../src/module.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/auth-backend-module-azure-easyauth-provider/src/module.ts b/plugins/auth-backend-module-azure-easyauth-provider/src/module.ts index 4a8fffeca4..7cd5247648 100644 --- a/plugins/auth-backend-module-azure-easyauth-provider/src/module.ts +++ b/plugins/auth-backend-module-azure-easyauth-provider/src/module.ts @@ -58,15 +58,16 @@ function validateAppServiceConfiguration(env: NodeJS.ProcessEnv) { if (env.WEBSITE_SKU === undefined) { throw new Error('Backstage is not running on Azure App Services'); } - if (env.WEBSITE_AUTH_ENABLED?.toLowerCase() !== 'true') { + if (env.WEBSITE_AUTH_ENABLED?.toLocaleLowerCase('en-US') !== 'true') { throw new Error('Azure App Services does not have authentication enabled'); } if ( - env.WEBSITE_AUTH_DEFAULT_PROVIDER?.toLowerCase() !== 'azureactivedirectory' + env.WEBSITE_AUTH_DEFAULT_PROVIDER?.toLocaleLowerCase('en-US') !== + 'azureactivedirectory' ) { throw new Error('Authentication provider is not Entra ID'); } - if (process.env.WEBSITE_AUTH_TOKEN_STORE?.toLowerCase() !== 'true') { + if (env.WEBSITE_AUTH_TOKEN_STORE?.toLocaleLowerCase('en-US') !== 'true') { throw new Error('Token Store is not enabled'); } }