aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(static)/register/auth
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-27 15:24:13 -0800
committerAdam Soltys <[email protected]>2026-02-27 15:24:13 -0800
commit16da2cb00d16f87d02535bfdae815f83f19f251f (patch)
tree2e6d003975d5a7a67cc81243da4a59bc476fff48 /src/routes/(static)/register/auth
parent11fbf552ebbb9d1d5ae6823893ee80ae23f450a0 (diff)
downloadcoinos-ui-16da2cb00d16f87d02535bfdae815f83f19f251f.tar.gz
coinos-ui-16da2cb00d16f87d02535bfdae815f83f19f251f.zip
fix race condition
Diffstat (limited to 'src/routes/(static)/register/auth')
-rw-r--r--src/routes/(static)/register/auth/+page.svelte4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/(static)/register/auth/+page.svelte b/src/routes/(static)/register/auth/+page.svelte
index d285e0af..ad5d6e54 100644
--- a/src/routes/(static)/register/auth/+page.svelte
+++ b/src/routes/(static)/register/auth/+page.svelte
@@ -71,7 +71,7 @@
const getRecaptchaToken = () =>
new Promise((resolve, reject) => {
- if (isTor) return resolve("");
+ if (isTor || !recaptchaSiteKey) return resolve("");
if (!browser || !grecaptcha) return reject(new Error("captcha unavailable"));
grecaptcha.ready(() => {
grecaptcha.execute(recaptchaSiteKey, { action: "register" }).then(resolve).catch(reject);
@@ -144,7 +144,7 @@
const result = deserialize(await response.text());
- if (result.type === "success") {
+ if (result.type === "success" || result.type === "redirect") {
try {
const { deriveAuthKeypair } = await import("$lib/deriveAuthKey");
const { sk } = await deriveAuthKeypair(user.username, user.password);