Skip to content

Commit 2b0a008

Browse files
committed
fix(recaptcha): revert
1 parent 5ddf4c1 commit 2b0a008

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

components/Launcher.vue

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@
88
align="center"
99
>
1010
<h4 class="pb-3">Please complete the recaptcha to launch the app</h4>
11-
<Recaptcha site_key="6Lce72wgAAAAAOXrHyDxRQBhk6NDTD80MrXOlgbC" />
11+
<!-- <Recaptcha site_key="6Lce72wgAAAAAOXrHyDxRQBhk6NDTD80MrXOlgbC" /> -->
12+
<vue-recaptcha
13+
ref="recaptcha"
14+
sitekey="6Lce72wgAAAAAOXrHyDxRQBhk6NDTD80MrXOlgbC"
15+
:loadRecaptchaScript="true"
16+
@expired="is_captcha_validated = false"
17+
@verify="submit_recaptcha"
18+
align-self="center"
19+
/>
1220
</v-col>
1321
<v-col
1422
v-else-if="!cloud_store.is_running && cloud_store.is_connexion_launched"
@@ -37,4 +45,16 @@
3745
onMounted(() => {
3846
console.log("onMounted", useRuntimeConfig())
3947
})
48+
49+
async function submit_recaptcha(token) {
50+
try {
51+
const response = await $fetch.raw(
52+
`/.netlify/functions/recaptcha?token=${token}`,
53+
)
54+
cloud_store.$patch({ is_captcha_validated: response.status == 200 })
55+
recaptcha.reset()
56+
} catch (error) {
57+
console.error(error)
58+
}
59+
}
4060
</script>

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)