fix admin local auth

This commit is contained in:
dswbx
2025-12-03 17:41:25 +01:00
parent a39e76a440
commit 959dee013e
2 changed files with 12 additions and 6 deletions
+5 -2
View File
@@ -43,7 +43,10 @@ export function AuthForm({
}) as Record<string, AppAuthOAuthStrategy>;
const has_oauth = Object.keys(oauth).length > 0;
async function onSubmit(data: any, ctx: { event: FormEvent<HTMLFormElement> }) {
async function onSubmit(
data: any,
ctx: { event: FormEvent<HTMLFormElement>; form: HTMLFormElement },
) {
if ($auth?.local) {
ctx.event.preventDefault();
@@ -58,7 +61,7 @@ export function AuthForm({
await _onSubmit?.(ctx.event);
// submit form
ctx.event.currentTarget.submit();
ctx.form.submit();
}
useEffect(() => {