You've already forked AstralRinth
forked from didirus/AstralRinth
Switch to HCaptcha for Auth-related captchas (#2945)
* Switch to HCaptcha for Auth-related captchas * run fmt
This commit is contained in:
@@ -22,12 +22,7 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<NuxtTurnstile
|
||||
ref="turnstile"
|
||||
v-model="token"
|
||||
class="turnstile"
|
||||
:options="{ theme: $theme.active === 'light' ? 'light' : 'dark' }"
|
||||
/>
|
||||
<HCaptcha ref="captcha" v-model="token" />
|
||||
|
||||
<button class="btn btn-primary centered-btn" :disabled="!token" @click="recovery">
|
||||
<SendIcon /> {{ formatMessage(methodChoiceMessages.action) }}
|
||||
@@ -73,6 +68,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { SendIcon, MailIcon, KeyIcon } from "@modrinth/assets";
|
||||
import HCaptcha from "@/components/ui/HCaptcha.vue";
|
||||
|
||||
const { formatMessage } = useVIntl();
|
||||
|
||||
@@ -165,7 +161,7 @@ if (route.query.flow) {
|
||||
step.value = "passed_challenge";
|
||||
}
|
||||
|
||||
const turnstile = ref();
|
||||
const captcha = ref();
|
||||
|
||||
const email = ref("");
|
||||
const token = ref("");
|
||||
@@ -194,7 +190,7 @@ async function recovery() {
|
||||
text: err.data ? err.data.description : err,
|
||||
type: "error",
|
||||
});
|
||||
turnstile.value?.reset();
|
||||
captcha.value?.reset();
|
||||
}
|
||||
stopLoading();
|
||||
}
|
||||
@@ -227,7 +223,7 @@ async function changePassword() {
|
||||
text: err.data ? err.data.description : err,
|
||||
type: "error",
|
||||
});
|
||||
turnstile.value?.reset();
|
||||
captcha.value?.reset();
|
||||
}
|
||||
stopLoading();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user