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);
|
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(() => {
|
||||||
|
|||||||
Submodule drop-base updated: 2f0ed58cb3...dad3487be6
@@ -8,5 +8,5 @@ useHead({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
router.replace("/store");
|
router.push("/store");
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user