two-factor authentication not working, not even asking me for security code
You can manually obtain a verification code


iPhone: Settings → Apple ID → Password &amp; Security → Get Verification Code.
Mac: System Preferences → iCloud → Account Details → Security → Get A Verification Code.