Apple has finally taken measures to prevent celebrity photo hacking attempts. The tech giant introduced the long-due two-factor authentication to all iCloud accounts as a way to protect stored data. ARS Technica reports that the new security feature is already active for iCloud logins.

In order to set up the two-factor authentication on Apple's cloud storage service, users must login to the Apple ID account, click on "Password and Security" and find "Two-step verification." Once activated, a unique four-digit verification code is sent to the registered mobile number via SMS or Find My iPhone. The unique code will be asked every time there is suspicious account activity, like login from an unfamiliar device. This way, unauthorized access to the accounts will be blocked.

According to ARS Technica, the two-factor verification also disabled certain hack tools like the Elcom Phone Password Breaker used by the publication to test the vulnerability of the account. But for the accounts without the two-factor security, Elcomsoft's tool was able to bypass the login screen and retrieve phone backup and data.

The high-profile leak of celebrity selfies from compromised iCloud accounts highlighted Apple's weak security system. The two-factor encryption, which has widely been integrated into several web-based services like Twitter and Gmail, has played an important role in enhancing securities of accounts. Twitter realized the importance of the advanced security system after a series of renowned news publications and high-profile accounts were hacked by a group called SEA. The social network added the two-factor authentication in April last year and improved security on the accounts in May.

Back in March, Yahoo-owned micro-blogging platform Tumblr also integrated two-factor authentication and other companies like Microsoft and Dropbox have also incorporated similar security methods to protect users from hackers.