Cannot sign in to iCloud on 3GS
I have a fairly old iPhone 3GS; it's no longer my main phone but it does good and useful things for me. Over the weekend it suddenly started repeatedly asking me to sign in to iCloud. The usual advice for this situation is to sign out and in again. So I signed out, but can no longer sign in.
Here is what happens. I go to "Settings", "iCloud" and enter the Apple ID and password. (If I enter a wrong password, it reports that, so the password is being checked). I then reach the "Verify Identity" screen and am presented with the list of devices for two-step verification. I select one of them (I doesn't matter which) and tap "Next". Then... nothing. It just stays on the same screen. No verification code is sent and I am not invited to enter it. The "Next" button does react when I touch it, but it doesn't do anything.
The only other option here apart from "Cancel" is "Unable to access your devices?". I tried this, and am prompted for the recovery key. There's an oddity on this screen that the text entry area is partially obscured by text, but I can enter it. But again, after tapping "Next", nothing at all happens. It just sits there with the recovery key on the screen.
I have tried rebooting the phone, which makes no difference.
Everything else seems to work. My Apple ID is fine on other devices.
Any ideas?
iPhone 3GS, iOS 6.1.6