Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions components/Auth/Simple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,14 @@ const rememberMe = ref(false);
const loading = ref(false);

async function passkeyAutofill() {
const silentWebauthnOptions = await $dropFetch("/api/v1/auth/passkey/start", {
method: "POST",
});
let silentWebauthnOptions;
try {
silentWebauthnOptions = await $dropFetch("/api/v1/auth/passkey/start", {
method: "POST",
});
} catch {
return;
}

const result = await startAuthentication({
optionsJSON: silentWebauthnOptions,
Expand All @@ -122,8 +127,7 @@ onMounted(async () => {
try {
await passkeyAutofill();
} catch (response) {
const message =
(response as FetchError).statusMessage || t("errors.unknown");
const message = (response as FetchError).message || t("errors.unknown");
error.value = message;
} finally {
loading.value = false;
Expand All @@ -141,7 +145,7 @@ function signin_wrapper() {
loading.value = true;
signin()
.catch((response) => {
const message = response.statusMessage || t("errors.unknown");
const message = response.message || t("errors.unknown");
error.value = message;
})
.finally(() => {
Expand Down
2 changes: 1 addition & 1 deletion drop-base
2 changes: 1 addition & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ useHead({
});

const router = useRouter();
router.replace("/store");
router.push("/store");
</script>
Loading