In a large skillet or Dutch oven, heat the vegetable oil over medium-high heat. Add the chicken thighs, skin side down, and sear until golden brown, about 5-7 minutes. Flip and sear the other side for an additional 5 minutes. Remove the chicken and set aside.
In the same skillet, add the sliced onion and sauté until translucent, about 3-4 minutes. Add the minced garlic and cook for another minute until fragrant.
Pour in the soy sauce, white vinegar, and water. Stir in the bay leaves, black peppercorns, brown sugar, ground ginger, and red pepper flakes if using. Bring the mixture to a simmer.
Return the seared chicken to the skillet, ensuring it is submerged in the sauce. Cover and reduce the heat to low. Simmer for 30-40 minutes, or until the chicken is cooked through and tender.
Taste the sauce and adjust salt if necessary. If you prefer a thicker sauce, remove the chicken once cooked and simmer the sauce uncovered for an additional 10 minutes until it thickens.
Serve the chicken hot, garnished with chopped green onions, alongside rice or noodles to soak up the delicious sauce.