Secession, I believe was finally declared illegal by SCOTUS in 1869 in a case not very related to that part of the ruling. I guess they just felt they had to get it out there somehow. After all, 600,000 people were dead. Secession just HAD to be illegal.
All Texas v. White said was that a state could not
unilaterally secede from the Union. And that ruling was pretty shady. The Chief Justice was Salmon Chase, a former cabinet member under Abraham Lincoln. Chase's theory of an "indissoluble relation" flies in the face of contract law as well as later SCOTUS rulings.
Justice Robert Grier (5-3 decision, Justices Noah Swayne and Samuel F. Miller also dissenting) wrote a dissent in which he stated that he disagreed "on all points raised and decided" by the majority. Grier relied on the case Hepburn v. Ellzey in which Chief Justice John Marshall had defined a state as an entity entitled to representatives in both Congress and the Electoral College. During the "rebellion" Texas was not entitled to representation in Washington DC.
He believed that the issue of Texas statehood was a matter for congressional rather than judicial determination, and he was "not disposed to join in any essay to prove Texas to be a State of the Union when Congress had decided that she is not." IE, Congress had decided Texas was not entitled to Representation in DC, therefore, Texas was not a State in the Union.