Indeed, in 1892 (McPherson v. Blacker), in upholding Michigan's practice of dividing the state's electors by congressional district (as done today in Maine and Nebraska), the Supreme Court wrote, "The legislature possesses plenary authority to direct the manner of appointment, and might itself exercise the appointing power by joint ballot or concurrence of the two houses, or according to such mode as it designated." In Bush v. Gore, the high court reiterated that any state legislature "may, if it so chooses, select the electors itself."
https://www.theblaze.com/op-ed/horowitz-state-legislatures-rectify-election-fraud