Actually, you can update iTunes to 12.6.2 in Mavericks. But I understand if you wouldn't wish to do that, the 12th version looks petty and is inconvenient to manage. For the same reason, I remained on 11.4 in Mavericks. I double-checked: since iTunes Store is non-functional now in v. 11 I turned it off in Parental Guide section of iTunes Preferences but I was able to turn off and on Home Sharing by entering my credentials. If you cannot make the verification code generate on an idevice at hand then activating Home Sharing without the code will be impossible. I also was getting the error about the failed authentication with the error -50 (although my Mac had been already authorized so there was no need of meddling with it) just because Apple rendered iTunes Store sign-in non-operational and I can't access my account from within iTunes.
As for High Sierra, I inadvertently skipped the step in my previous post, but now I'm posting this screenshot of how does one access the verification code generator. However, this is of little help as you don't have any option to append the code in a reasonable time - each bootable partition is treated as a separate Apple device.