Revert "feat: use middleware to auth"

This reverts commit f57cdb5ec1.
This commit is contained in:
shinya
2025-07-01 00:26:34 +08:00
parent d56cc5bdab
commit 7d6c7e5dd0
5 changed files with 53 additions and 86 deletions

View File

@@ -27,6 +27,11 @@ function LoginPageClient() {
});
if (res.ok) {
// 保存密码以供后续请求使用
if (typeof window !== 'undefined') {
localStorage.setItem('password', password);
}
const redirect = searchParams.get('redirect') || '/';
router.replace(redirect);
} else if (res.status === 401) {