Yes, two-factor authentication works with all types of accounts, including iCloud accounts, Facebook accounts, and Google Accounts.