feat: add support for email verification (#1223)

This commit is contained in:
Elias Schneider
2026-01-11 12:31:26 +01:00
committed by GitHub
parent e955118a6f
commit 1e7442f5df
60 changed files with 1452 additions and 700 deletions

View File

@@ -8,8 +8,9 @@
import UserService from '$lib/services/user-service';
import WebAuthnService from '$lib/services/webauthn-service';
import appConfigStore from '$lib/stores/application-configuration-store';
import userStore from '$lib/stores/user-store';
import type { Passkey } from '$lib/types/passkey.type';
import type { UserCreate } from '$lib/types/user.type';
import type { AccountUpdate, UserCreate } from '$lib/types/user.type';
import { axiosErrorToast, getWebauthnErrorMessage } from '$lib/utils/error-util';
import {
KeyRound,
@@ -39,11 +40,14 @@
!$appConfigStore.allowOwnAccountEdit || (!!account.ldapId && $appConfigStore.ldapEnabled)
);
async function updateAccount(user: UserCreate) {
async function updateAccount(user: AccountUpdate) {
let success = true;
await userService
.updateCurrent(user)
.then(() => toast.success(m.account_details_updated_successfully()))
.then((user) => {
toast.success(m.account_details_updated_successfully());
userStore.setUser(user);
})
.catch((e) => {
axiosErrorToast(e);
success = false;