I just had an odd experience: I signed into appleid.apple.com on Safari on my mac, and the two factor verification code box came up, and the code also came up, both on my mac. So I just copied the code into the box and logged in. Seems this should not happen - seems to defeat the object! Any ideas why this happened?