mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-01-31 15:37:09 +01:00
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:
@@ -98,9 +98,14 @@ const rememberMe = ref(false);
|
||||
const loading = ref(false);
|
||||
|
||||
async function passkeyAutofill() {
|
||||
const silentWebauthnOptions = await $dropFetch("/api/v1/auth/passkey/start", {
|
||||
let silentWebauthnOptions;
|
||||
try {
|
||||
silentWebauthnOptions = await $dropFetch("/api/v1/auth/passkey/start", {
|
||||
method: "POST",
|
||||
});
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
|
||||
const result = await startAuthentication({
|
||||
optionsJSON: silentWebauthnOptions,
|
||||
@@ -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;
|
||||
@@ -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(() => {
|
||||
|
||||
Submodule drop-base updated: 2f0ed58cb3...dad3487be6
@@ -8,5 +8,5 @@ useHead({
|
||||
});
|
||||
|
||||
const router = useRouter();
|
||||
router.replace("/store");
|
||||
router.push("/store");
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user