iCloud for Windows asks for password, then sends verification code to iPhone, then asks for password... forever.
From a web browser I go to iCloud.com and I sign in with my credentials (user id and password - no PINs). I am sent a verification code to my iPhone. I enter the verification code on the web site and I am in, proving my sign in credentials are valid.
I boot my Windows 10 machine, on which I previously (years ago) installed iCloud for Windows. After the machine boots, iCloud for Windows pops open and then, about 3 seconds later, presents the "Continue to Sign in to iCloud" dialog box. It says "Enter the password for XXXXXXX", the same user Id I used to sign in from the browser. I enter the same password I used when I signed in via the browser and click Sign In. The dialog box changes to "Apple ID Verification Code" and a verification code is sent to my iPhone. I enter it and it says "Signing in..." and then a message appears "To sign in with this account, you need to enter the code from a device that's close by. Make sure Bluetooth is turned on or your Apple device is on the same Wi-Fi network as this computer." I click OK and the dialog box disappears and a few seconds later "Continue to Sign in to iCloud" appears. This is a loop.
How do I resolve this and sign in (once!) to iCloud for Windows?