fix(auth): prevent auto-login after logout

This commit is contained in:
Diego Souza
2026-02-06 23:14:10 +00:00
parent ff2ba87161
commit 49df3dce90

View File

@@ -30,19 +30,7 @@ export default function LoginPage() {
router.refresh();
return;
}
if (!data.password) {
const loginRes = await fetch(`${baseUrl}/api/auth/login`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ password: "123456" }),
});
if (loginRes.ok) {
router.push("/dashboard");
router.refresh();
return;
}
}
setHasPassword(!!data.password);
setHasPassword(!!data.hasPassword);
}
} catch (err) {
clearTimeout(timeoutId);