iOS 17 brings a long overdue security feature to your iPhone — here's how to enable it

iOS 17 logo on iPhone
(Image credit: Future)

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. We can show you how to download and install iOS 17 if you aren't sure how.

1. Go to Settings > Passwords

(Image: © Future)

Open the Settings app and tap Passwords.

2. Tap Password Options

(Image: © Future)

Enter your passcode or unlock your phone using biometrics. Now tap Password Options.

3. Toggle on Clean Up Automatically

(Image: © Future)

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.

TOPICS
Peter Wolinski
Reviews Editor

Peter is Reviews Editor at Tom's Guide. As a writer, he covers topics including tech, photography, gaming, hardware, motoring and food & drink. Outside of work, he's an avid photographer, specialising in architectural and portrait photography. When he's not snapping away on his beloved Fujifilm camera, he can usually be found telling everyone about his greyhounds, riding his motorcycle, squeezing as many FPS as possible out of PC games, and perfecting his espresso shots. 

Read more
Passwords app on iPhone next to iOS 18 logo
iOS 18.4 just got a handy security upgrade that will make your life easier
Image of Gmail's logo on a laptop
Major Gmail change just confirmed for millions of users — what you need to know
Image showing iPhone with iMessage app open
How to see deleted messages on iPhone
iPhone 16 Pro shown held in hand
You can disable those awkward AI message summaries on iPhone — here's how
iPhone 15 Pro Max shown in hand
iMessage under attack from scammers sending phishing messages — don’t fall for it
Priority Notifications appearing on an iPhone lock screen
iOS 18.4 has one killer upgrade that will make your life easier — here's how to set it up
Latest in iPhones
iphone 17 renders showing off rear and camera bump
iPhone 17 just tipped for this major display upgrade — thanks to Samsung
iOS 18.4 logo on an iPhone
iOS 18.4 brings a bunch of helpful upgrades to your iPhone — and this is my favorite
WWDC logo on yellow background
Apple WWDC 2025 date set for June 9 — iOS 19, Apple Intelligence and more expected
iPhone 16 with Apple Intelligence logo for iOS 18.1
iOS 18.4: All the newest Apple Intelligence features coming to your iPhone
Apple maps logo on iPhone screen
I avoided Apple Maps for trip planning — but these iOS 18 features are changing my mind
New emojis with iOS 18.4 beta release.
iOS 18.4 beta brings 8 new emoji to your iPhone — here's all the new options
Latest in How To
Mohu Leaf 50 Indoor Amplified HDTV Antenna Review
5 tips to get the best reception from a TV antenna
Streaming services with a pile of cash
How to decide which streaming services to cancel
Removing dehumidifier water
5 clever ways to reuse your dehumidifier water around the home
avoid AI scams
Online sellers are using AI to scam you — here’s how to outsmart them
ChatGPT on iPhone
I asked ChatGPT to become my exercise coach — here's what happened
23andME box
23andMe has declared bankruptcy — here's how to delete your data now