In a large bowl, mix the drained potatoes and onions with beaten eggs, flour, salt, and pepper until well combined.