I saw someone claim that passports were only made mandatory for international travel due to WWI and 'National Socialists' being xenophobic. This didn't sound right to me, how accurate is this?
It is true that during WWI European leaders started requiring border passes for security reasons. Part of this was to control emigration. These policies remained after the war, and became solidified in 1920 when the newly formed League of Nations held the Paris Conference on Passports and Customs Formalities and Through Tickets. These policies were controversial at first, especially to tourists, but the foundations were set for the Passport and border crossing system we have today.
I can't speak to the nationalistic xenophobia contributing to these policies, so sorry if this doesn't fully answer your question.
Source: Michael Marrus' "The Unwanted: European Refugees in the 20th Century"
This really depends on the definition of passport. If the definition is in the sense of the modern passport, then it is correct that the modern standard was formalized in 1920 by the League of Nations' Paris Conference on passports.
However if the definition of a passport is any official documentation used for identification in travel, then the history goes back to antiquity. The etymology of passport is a document used for passing through gate of a city wall. Governments in both the east and west issued official documentation for travelers debuting their restrictions and purposes of travel.
Up until 1860 in Sweden, you needed certain documents just to travel within the country. Every inn was required to keep a ledger where all guests were recorded. If you travelled without a passport you risked being identified as a vagrant, which was illegal and could lead to private or public forced labour. Between the late 1800s and 1920, you could travel freely both domestically and throughout most of Europe (except Russia and the Ottoman empire) without a passport.
Source: I did my masters thesis on a related issue.