aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.env.sample3
-rw-r--r--src/routes/(app)/reset/[code]/+page.svelte5
-rw-r--r--src/routes/(static)/login/+page.svelte5
-rw-r--r--src/routes/(static)/register/+page.svelte5
-rw-r--r--src/routes/(static)/support/+page.svelte5
5 files changed, 14 insertions, 9 deletions
diff --git a/.env.sample b/.env.sample
index 8474ee0a..72dfb652 100644
--- a/.env.sample
+++ b/.env.sample
@@ -7,4 +7,5 @@ ORIGIN=http://localhost:5173
PUBLIC_DOMAIN=localhost:5173
PUBLIC_COINOS_PUBKEY=ba80990666ef0b6f4ba5059347beb13242921e54669e680064ca755256a1e3a6
PUBLIC_COINOS_RELAY=wss://relay.coinos.io
-PUBLIC_COINOS_NETWORK=regtest \ No newline at end of file
+PUBLIC_COINOS_NETWORK=regtest
+PUBLIC_RECAPTCHA_SITE_KEY=
diff --git a/src/routes/(app)/reset/[code]/+page.svelte b/src/routes/(app)/reset/[code]/+page.svelte
index 227d0106..4cecb4fb 100644
--- a/src/routes/(app)/reset/[code]/+page.svelte
+++ b/src/routes/(app)/reset/[code]/+page.svelte
@@ -1,4 +1,5 @@
<script>
+ import { PUBLIC_RECAPTCHA_SITE_KEY } from "$env/static/public";
import { browser } from "$app/environment";
import { onDestroy, tick } from "svelte";
import { t } from "$lib/translations";
@@ -13,7 +14,7 @@
let email;
let loading;
let recaptchaToken = "";
- let recaptchaSiteKey = "6LfCd8YkAAAAANmVJgzN3SQY3n3fv1RhiS5PgMYM";
+ let recaptchaSiteKey = PUBLIC_RECAPTCHA_SITE_KEY;
const getRecaptchaToken = () =>
new Promise((resolve, reject) => {
@@ -59,7 +60,7 @@
<svelte:head
><script
- src="https://www.google.com/recaptcha/api.js?render=6LfCd8YkAAAAANmVJgzN3SQY3n3fv1RhiS5PgMYM"
+ src={"https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey}
></script></svelte:head
>
diff --git a/src/routes/(static)/login/+page.svelte b/src/routes/(static)/login/+page.svelte
index 08656949..199f3634 100644
--- a/src/routes/(static)/login/+page.svelte
+++ b/src/routes/(static)/login/+page.svelte
@@ -1,4 +1,5 @@
<script>
+ import { PUBLIC_RECAPTCHA_SITE_KEY } from "$env/static/public";
import { browser } from "$app/environment";
import handler from "$lib/handler";
import { applyAction, deserialize } from "$app/forms";
@@ -37,7 +38,7 @@
});
let { challenge } = $derived(data);
- let recaptchaSiteKey = "6LfCd8YkAAAAANmVJgzN3SQY3n3fv1RhiS5PgMYM";
+ let recaptchaSiteKey = PUBLIC_RECAPTCHA_SITE_KEY;
let token = $state("");
let cancel = () => (need2fa = false);
@@ -164,7 +165,7 @@
<svelte:head
><script
- src="https://www.google.com/recaptcha/api.js?render=6LfCd8YkAAAAANmVJgzN3SQY3n3fv1RhiS5PgMYM"
+ src={"https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey}
></script></svelte:head
>
diff --git a/src/routes/(static)/register/+page.svelte b/src/routes/(static)/register/+page.svelte
index f1ac582b..f47bb3c1 100644
--- a/src/routes/(static)/register/+page.svelte
+++ b/src/routes/(static)/register/+page.svelte
@@ -1,4 +1,5 @@
<script>
+ import { PUBLIC_RECAPTCHA_SITE_KEY } from "$env/static/public";
import { onDestroy, onMount } from "svelte";
import { browser } from "$app/environment";
import punks from "$lib/punks";
@@ -28,7 +29,7 @@
let { form, data } = $props();
let { challenge } = $derived(data);
- let recaptchaSiteKey = "6LfCd8YkAAAAANmVJgzN3SQY3n3fv1RhiS5PgMYM";
+ let recaptchaSiteKey = PUBLIC_RECAPTCHA_SITE_KEY;
onMount(() => {
if (browser) {
@@ -254,7 +255,7 @@
<svelte:head
><script
- src="https://www.google.com/recaptcha/api.js?render=6LfCd8YkAAAAANmVJgzN3SQY3n3fv1RhiS5PgMYM"
+ src={"https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey}
></script></svelte:head
>
diff --git a/src/routes/(static)/support/+page.svelte b/src/routes/(static)/support/+page.svelte
index b9028cbf..09959174 100644
--- a/src/routes/(static)/support/+page.svelte
+++ b/src/routes/(static)/support/+page.svelte
@@ -1,4 +1,5 @@
<script>
+ import { PUBLIC_RECAPTCHA_SITE_KEY } from "$env/static/public";
import { browser } from "$app/environment";
import { onDestroy } from "svelte";
import { fail, success, post } from "$lib/utils";
@@ -13,7 +14,7 @@
let email = $state();
let message = $state();
let sent = $state();
- let recaptchaSiteKey = "6LfCd8YkAAAAANmVJgzN3SQY3n3fv1RhiS5PgMYM";
+ let recaptchaSiteKey = PUBLIC_RECAPTCHA_SITE_KEY;
let submit = (e) => {
e.preventDefault();
@@ -51,7 +52,7 @@
<svelte:head
><script
- src="https://www.google.com/recaptcha/api.js?render=6LfCd8YkAAAAANmVJgzN3SQY3n3fv1RhiS5PgMYM"
+ src={"https://www.google.com/recaptcha/api.js?render=" + recaptchaSiteKey}
></script></svelte:head
>