The legality of what the south did was a matter of speculation and debate long before they launched on that terrible course. And they knew it. They knew it and tabled the debate by force of arms and insurrection.
That insurrection compelled Lincoln to act in accordance with the law and his oath. THOSE are the historic facts which have been camouflaged by generations of LEFTIST revisionist historians.
The South did not invade the North. It left. The supposed moral superiority of the North is a fiction. As is the demonization of the South. We are all better off that slavery was abolished but mythmaking by the victor is no substitute for truth.