Skip to content

Commit b64afca

Browse files
fix(recaptcha): site_key_prop
1 parent c806aa7 commit b64afca

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

components/Launcher.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
align="center"
99
>
1010
<h4 class="pb-3">Please complete the recaptcha to launch the app</h4>
11-
<Recaptcha />
11+
<Recaptcha :site_key="site_key" />
1212
</v-col>
1313
<v-col
1414
v-else-if="!cloud_store.is_running && cloud_store.is_connexion_launched"
@@ -24,6 +24,8 @@
2424
const cloud_store = use_cloud_store()
2525
const { is_captcha_validated } = storeToRefs(cloud_store)
2626
27+
const site_key = useRuntimeConfig().public.RECAPTCHA_SITE_KEY
28+
2729
watch(is_captcha_validated, async (value) => {
2830
if (value === true && process.client) {
2931
await cloud_store.create_connexion()

components/Recaptcha.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
const cloud_store = use_cloud_store()
1717
const { is_captcha_validated } = storeToRefs(cloud_store)
1818
19-
const site_key = useRuntimeConfig().public.RECAPTCHA_SITE_KEY
19+
const props = defineProps({
20+
site_key: { type: String, required: true },
21+
})
22+
const { site_key } = props
2023
2124
onMounted(() => {
2225
if (process.client) {

0 commit comments

Comments
 (0)