diff --git a/pages/signup.vue b/pages/signup.vue index 16fc242..5789808 100644 --- a/pages/signup.vue +++ b/pages/signup.vue @@ -256,8 +256,8 @@ const valid = ref(false); const loading = ref(false); const errorMessage = ref(''); -// reCAPTCHA v2 state (static, not reactive) -let recaptchaSiteKey = ''; +// reCAPTCHA v2 state - site key must be reactive for template +const recaptchaSiteKey = ref(''); const recaptchaToken = ref(''); // Registration config (static, not reactive) @@ -450,12 +450,12 @@ onMounted(async () => { // Set static config values if (configs.recaptcha?.siteKey) { - recaptchaSiteKey = configs.recaptcha.siteKey; + recaptchaSiteKey.value = configs.recaptcha.siteKey; console.log('[signup] reCAPTCHA configured'); // Load reCAPTCHA v2 script with delay to prevent render blocking setTimeout(() => { - loadRecaptchaScript(recaptchaSiteKey); + loadRecaptchaScript(recaptchaSiteKey.value); }, 100); }