Revert "feat: use middleware to auth"

This reverts commit f57cdb5ec1.
This commit is contained in:
shinya
2025-06-30 23:17:05 +08:00
parent afef6d9865
commit 240764e81b
5 changed files with 53 additions and 92 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) {