Refactor authentication system: replace NextAuth with custom login/logout/session handling, improve cookie management, and enhance error handling
Build and Push Reader Image / docker (push) Successful in 39s

This commit is contained in:
2026-04-24 01:53:32 +07:00
parent 690a2fbd51
commit 7c4404ded8
26 changed files with 368 additions and 239 deletions
+2 -2
View File
@@ -206,7 +206,7 @@ export function Header() {
</Link>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem onClick={logout} className="flex items-center gap-2 text-destructive">
<DropdownMenuItem onClick={() => void logout()} className="flex items-center gap-2 text-destructive">
<LogOut className="h-4 w-4" />
Đăng Xuất
</DropdownMenuItem>
@@ -304,7 +304,7 @@ export function Header() {
<p className="text-xs text-primary">Loại tài khoản: {roleLabel(user.role)}</p>
</div>
</div>
<Button variant="ghost" size="sm" className="w-full justify-start text-destructive" onClick={() => { logout(); setOpen(false) }}>
<Button variant="ghost" size="sm" className="w-full justify-start text-destructive" onClick={() => { void logout(); setOpen(false) }}>
<LogOut className="mr-2 h-4 w-4" />
Đăng Xuất
</Button>