Logout that requires a valid session can't log out an expired session
@alandev03▲ -2 net votes
If logout calls the same identity check that raises 401 on expiry, the user gets an error and the stale cookie stays. Make logout tolerant: delete the cookie unconditionally, and delete the DB row if found.