diff --git a/app/controllers/api/v1/api_controller.rb b/app/controllers/api/v1/api_controller.rb index 502124b701..92b27351bf 100644 --- a/app/controllers/api/v1/api_controller.rb +++ b/app/controllers/api/v1/api_controller.rb @@ -89,7 +89,7 @@ def config_sorting(allowed_columns: []) { sort_column => sort_direction } end - # Checks if external authentication is enabled + # Checks if external authentication is enabled (currently only OIDC is implemented) def external_authn_enabled? ENV['OPENID_CONNECT_ISSUER'].present? end diff --git a/app/controllers/api/v1/env_controller.rb b/app/controllers/api/v1/env_controller.rb index 2541f5ed19..946e261c2f 100644 --- a/app/controllers/api/v1/env_controller.rb +++ b/app/controllers/api/v1/env_controller.rb @@ -25,7 +25,7 @@ class EnvController < ApiController # Returns basic NON-CONFIDENTIAL information on the environment variables def index render_data data: { - OPENID_CONNECT: ENV['OPENID_CONNECT_ISSUER'].present?, + EXTERNAL_AUTH: ENV['OPENID_CONNECT_ISSUER'].present?, # currently only OIDC is implemented HCAPTCHA_KEY: ENV.fetch('HCAPTCHA_SITE_KEY', nil), VERSION_TAG: ENV.fetch('VERSION_TAG', ''), CURRENT_PROVIDER: current_provider, diff --git a/app/javascript/components/admin/manage_users/ManageUsers.jsx b/app/javascript/components/admin/manage_users/ManageUsers.jsx index c72d9eef3b..b8269617b1 100644 --- a/app/javascript/components/admin/manage_users/ManageUsers.jsx +++ b/app/javascript/components/admin/manage_users/ManageUsers.jsx @@ -81,7 +81,7 @@ export default function ManageUsers() { /> )} { - (!envAPI.isLoading && !envAPI.data?.OPENID_CONNECT) + (!envAPI.isLoading && !envAPI.data?.EXTERNAL_AUTH) && ( - { env?.OPENID_CONNECT && ( + { env?.EXTERNAL_AUTH && ( diff --git a/app/javascript/components/rooms/room/join/JoinCard.jsx b/app/javascript/components/rooms/room/join/JoinCard.jsx index 41ac6ac491..73fc255feb 100644 --- a/app/javascript/components/rooms/room/join/JoinCard.jsx +++ b/app/javascript/components/rooms/room/join/JoinCard.jsx @@ -252,7 +252,7 @@ export default function JoinCard() { {!currentUser?.signed_in && ( - env?.OPENID_CONNECT ? ( + env?.EXTERNAL_AUTH ? ( {t('authentication.already_have_account')} diff --git a/app/javascript/components/rooms/room/join/RequireAuthentication.jsx b/app/javascript/components/rooms/room/join/RequireAuthentication.jsx index 98ed8676e0..88908ddcf0 100644 --- a/app/javascript/components/rooms/room/join/RequireAuthentication.jsx +++ b/app/javascript/components/rooms/room/join/RequireAuthentication.jsx @@ -38,7 +38,7 @@ export default function RequireAuthentication({ path }) { { - env?.OPENID_CONNECT ? ( + env?.EXTERNAL_AUTH ? (
diff --git a/app/javascript/components/users/authentication/Signup.jsx b/app/javascript/components/users/authentication/Signup.jsx index b5306175dc..7cbe8b3aa6 100644 --- a/app/javascript/components/users/authentication/Signup.jsx +++ b/app/javascript/components/users/authentication/Signup.jsx @@ -32,7 +32,7 @@ export default function Signup() { const envAPI = useEnv(); const isLoading = envAPI.isLoading || registrationMethodSettingAPI.isLoading; - if (envAPI.data?.OPENID_CONNECT) { + if (envAPI.data?.EXTERNAL_AUTH) { return ; } diff --git a/esbuild.dev.mjs b/esbuild.dev.mjs index 1bd3839ca4..3ff7311405 100644 --- a/esbuild.dev.mjs +++ b/esbuild.dev.mjs @@ -20,7 +20,7 @@ await esbuild.build({ }, define: { 'process.env.RELATIVE_URL_ROOT': `"${relativeUrlRoot}"`, - 'process.env.OMNIAUTH_PATH': `"${relativeUrlRoot}/auth/openid_connect"`, + 'process.env.OMNIAUTH_PATH': `"${relativeUrlRoot}/auth/openid_connect"`, // currently, only OIDC is implemented }, }); diff --git a/esbuild.mjs b/esbuild.mjs index 6330cbc21d..e9aa8a45e1 100644 --- a/esbuild.mjs +++ b/esbuild.mjs @@ -14,7 +14,7 @@ await esbuild.build({ }, define: { 'process.env.RELATIVE_URL_ROOT': `"${relativeUrlRoot}"`, - 'process.env.OMNIAUTH_PATH': `"${relativeUrlRoot}/auth/openid_connect"`, + 'process.env.OMNIAUTH_PATH': `"${relativeUrlRoot}/auth/openid_connect"`, // currently, only OIDC is implemented }, });