If you're anything like me — that is, on top of your device and account security — you'll have received countless text messages with two-factor authentication (2FA) codes over the years. While the best way (in my opinion, at least) to do 2FA is via an app like Google Authenticator, many companies still authenticate via SMS codes, sending them via SMS and email.
Now, these codes don't present much of a security risk. They expire quickly and after use. But the remaining emails and messages can clog up your Messages and Mail inboxes pretty quickly, especially if you're repeatedly logging into a service that authenticates in such a way.
Thankfully, with iOS 17, Apple have introduced an auto-delete feature which detects and gets rid of 2FA codes in your Messages inbox. This is a welcome feature, and something I wish Apple had introduced way sooner, as I find the SMS authentication messages a particular pain, clogging up my inbox (although admittedly I'm a bit too lazy to go through my inbox and clear the old code messages). If you ask me, this feature is long overdue.
To avoid any codes being deleted by accident while they're still usable, your iPhone will only delete them instantly after they've been inserted with AutoFill. However, I've noticed that all of my old code messages have been deleted, so it also seems there's a time limit after which your iPhone will auto delete the old messages too.
While this new feature is cool, it hasn't been at the forefront of the iOS 17 features Apple has focused on, so you may have missed it. Luckily, it's super easy to turn on. Here's how.
How to automatically delete 2FA verification messages on iPhone
This feature is part of iOS 17 which, at the time of writing, is still in beta. We can show you how to install the iOS 17 beta if you aren't sure how.
1. Go to Settings > Passwords
Open the Settings app and tap Passwords.
2. Tap Password Options
Enter your passcode or unlock your phone using biometrics. Now tap Password Options.
3. Toggle on Clean Up Automatically
Toggle on Clean Up Automatically.
We have loads of other guides to help you get the most out of your iPhone. Why not check out our guides on how to set up StandBy Mode on iPhone, how to quick reply in iOS Messages and how to use NameDrop on iPhone.