Fix sign-in page errors, etc (#322)

* fix: store page redirect

* fix: silent fail passkey + error display

* fix: remove console log modal
This commit is contained in:
DecDuck
2026-01-19 06:34:03 +00:00
committed by GitHub
parent 61355e1da2
commit 2967e433ca
3 changed files with 12 additions and 8 deletions

View File

@@ -98,9 +98,14 @@ const rememberMe = ref(false);
const loading = ref(false); const loading = ref(false);
async function passkeyAutofill() { async function passkeyAutofill() {
const silentWebauthnOptions = await $dropFetch("/api/v1/auth/passkey/start", { let silentWebauthnOptions;
method: "POST", try {
}); silentWebauthnOptions = await $dropFetch("/api/v1/auth/passkey/start", {
method: "POST",
});
} catch {
return;
}
const result = await startAuthentication({ const result = await startAuthentication({
optionsJSON: silentWebauthnOptions, optionsJSON: silentWebauthnOptions,
@@ -122,8 +127,7 @@ onMounted(async () => {
try { try {
await passkeyAutofill(); await passkeyAutofill();
} catch (response) { } catch (response) {
const message = const message = (response as FetchError).message || t("errors.unknown");
(response as FetchError).statusMessage || t("errors.unknown");
error.value = message; error.value = message;
} finally { } finally {
loading.value = false; loading.value = false;
@@ -141,7 +145,7 @@ function signin_wrapper() {
loading.value = true; loading.value = true;
signin() signin()
.catch((response) => { .catch((response) => {
const message = response.statusMessage || t("errors.unknown"); const message = response.message || t("errors.unknown");
error.value = message; error.value = message;
}) })
.finally(() => { .finally(() => {

View File

@@ -8,5 +8,5 @@ useHead({
}); });
const router = useRouter(); const router = useRouter();
router.replace("/store"); router.push("/store");
</script> </script>