diff --git a/deploy/helm/thecombine/charts/frontend/values.yaml b/deploy/helm/thecombine/charts/frontend/values.yaml index 42240c00fb..5ae4da14cf 100644 --- a/deploy/helm/thecombine/charts/frontend/values.yaml +++ b/deploy/helm/thecombine/charts/frontend/values.yaml @@ -23,6 +23,6 @@ imageName: combine_frontend # The additional domain list is a space-separated string list of domains combineAddlDomainList: "" configAnalyticsWriteKey: "" -configCaptchaSiteKey: "None - defined in profiles" +configCaptchaSiteKey: "" configOffline: false configShowCertExpiration: false diff --git a/src/components/Login/Captcha.tsx b/src/components/Login/Captcha.tsx index 8f3de5f5ed..8e740176dd 100644 --- a/src/components/Login/Captcha.tsx +++ b/src/components/Login/Captcha.tsx @@ -22,14 +22,6 @@ export default function Captcha(props: CaptchaProps): ReactElement { setSuccess(!isRequired.current); }, [isRequired, setSuccess]); - const siteKey = - process.env.NODE_ENV === "production" - ? RuntimeConfig.getInstance().captchaSiteKey() - : // https://developers.cloudflare.com/turnstile/troubleshooting/testing/ - // has dummy site keys for development and testing; options are - // invisible pass, invisible fail, visible pass, visible fail, forced interaction - "1x00000000000000000000AA"; // visible pass - const fail = (): void => { setSuccess(false); toast.error(t("captcha.error")); @@ -49,7 +41,7 @@ export default function Captcha(props: CaptchaProps): ReactElement { onExpire={fail} onSuccess={verify} options={{ language: i18n.resolvedLanguage, theme: "light" }} - siteKey={siteKey} + siteKey={RuntimeConfig.getInstance().captchaSiteKey()} /> ) : ( diff --git a/src/types/runtimeConfig.ts b/src/types/runtimeConfig.ts index ec17c2b26d..b784b35a00 100644 --- a/src/types/runtimeConfig.ts +++ b/src/types/runtimeConfig.ts @@ -17,7 +17,10 @@ declare global { const defaultConfig: RuntimeConfigItems = { baseUrl: "http://localhost:5000", captchaRequired: true, - captchaSiteKey: "0x4AAAAAAAiMciPlBW1aA1iL", + /* https://developers.cloudflare.com/turnstile/troubleshooting/testing/ + * has dummy site keys for development and testing; options are: + * invisible pass, invisible fail, visible pass, visible fail, forced interaction */ + captchaSiteKey: "1x00000000000000000000AA", // visible pass offline: false, emailServicesEnabled: true, showCertExpiration: true,