The French view on nationalism is that you get to call yourself French if you feel French and that you feel French if you agree with the French (revolutionary) values, mostly Liberté, Egalité, Fraternité. Race, language and origins have nothing to do with it. Ok, so recent immigration policies tell us something a bit different, but that is how the theory goes nevertheless: after all, France has been a melting pot of many migrations and cannot claim a unifying racial or ethnic component, so it didn't try to (well, some nationalists like Barrès and Maurras tried to, in the late 19th and early 20th century but they did not succeed and it was usually done to try to exclude some particular groups).
Ernest Renan summed up nationalism according to the French in 1882 with his phrase about the nation being 'a daily referendum' (he actually said plébiscite, but same difference) in Qu'est-ce que la Nation?. He further pointed out that South America definitely wasn't part of the Spanish nation, and that the United States were not part of the British nation either. He singled out Switzerland as the ultimate example that it was the will of the members of a nation that created it and not the commonality of their language.
So long as France was the Second Empire, it did not matter much. But Prussia did not sign the peace treaty with Napoléon III who, as a dynastic monarch, could theoretically dispose of parts of his country the same way it had been done in the 17th and 18th centuries: rather, the German Empire signed and ratified a treaty with the Third Republic.
And that Republic was born specifically of the war. Gambetta tried to summon the spirit of the First Republic with the very idea of 'la nation en armes' (the armed nation). In 1789, only an estimated 10% of Frenchmen could speak French. The rest spoke a kaleidoscope of patois, dialects and, in some cases, foreign languages. It did not matter. So long as you could bleed for France and its values, you were French.
It took two years, but one of the very first measures of the National Assembly was to emancipate the Jews who lived in France by granting them citizenship. It passed in 1791. Interestingly, the biggest share of those Jews lived in Alsace and Lorraine, was often very poor and, of course, did not speak French. In 1871, perhaps more than 40% of them emigrated to the rest of the French territory. A not inconsiderable part of newly-French Jews choose to convert to Christianity but by no means all or most of them. And in 1914, letters from Jewish 'poilus' show that they are going to war not necessarily because they like war but because they want to pay back the French nation and the Republic for what they gave them, referring to themselves as 'recently French' when their families had been French for sometimes a hundred years, three or four generations. As much as the Third Republic could prove centralizing on matters of culture (actively suppressing the Breton, Occitan, and many others, languages), there was also a very strong assimilating strand among the French from Lorraine, Provence and former Alsatians.
Then you have to take into consideration the attitude of the population during the war. Of course, nobody is going to be especially welcoming to huge armies, but Metz's population was, without contest, much more willing to fight than the general who was tasked with holding it (General Bazaine was found guilty of treason for his surrender. During the siege, he had to stay out of the city proper, because his wavering behaviour made him persona non grata among the citizens who were French, thank you very much, and did not want to give in). Strasbourg sustained a siege for a month before surrendering. As for Belfort, it capitulated only after Paris had done so and actually stayed French after the war. Francs-tireurs operated in Alsace as well.
So, if we take the realist view on foreign relations, Alsace-Moselle (France kept Nancy, after all) was the Germans' by the right of the strongest in 1871.
But in 1870, it's no contest: Alsatians, even if they might not appreciate some specific policies of the Second Empire, felt very much French. So much so that, as has been pointed previously in the thread, German nationalists had to pretend they knew better than the Alsatians themselves. And by the French definition of nationalism, they were very much welcomed in the French nation. Not because Louis XIV and Louis XV had conquered the place but because the people from Lorraine and Alsace had taken part in the Revolution and its wars and were part of the political system in France.