Most readers will have at some point received a two-factor authentication code delivered to them by SMS text message. Many apps and websites send the one-time codes to confirm that the person attempting to log in to an account is the legitimate account holder, and not just someone using a stolen password.

Depending on how notifications are set up on your iPhone, receiving a code via text message may mean that you have to switch out from the app or website to read the message and memorize or copy the code, and then switch back to paste it or type it into the login screen manually.

ios 12 secure code autofill 1
To make this process less of a hassle, Apple is introducing Security Code AutoFill for iOS 12. The new feature ensures that SMS one-time passcodes that you receive instantly appear as AutoFill suggestions in the QuickType bar above the virtual keyboard, letting you input them in the passcode field with a simple tap.

If you've enabled Text Message Forwarding on your iPhone, you can use the Secure Code AutoFill feature in macOS Mojave, too. The code should appear in Safari as an AutoFill option in the relevant field as soon as the SMS is delivered to Messages on your Mac.

secure code autofil mojave 2
iOS and macOS use local data detector heuristics to work out whether an incoming message carries a security code, and Apple says the Security Code AutoFill feature does not alter the security of this two-factor authentication method.

So as long as developers craft their secure code text messages correctly, Security Code AutoFill should work in all third-party apps updated for iOS 12 and macOS Mojave, which are due for official public release this fall.

Related Forums: iOS 12, macOS Mojave

Top Rated Comments

BootsWalking Avatar
86 months ago
Cool idea, but 2FA via SMS is inherently insecure and shouldn't be encouraged. However if Apple were to allow third-parties to deliver them over iMessage it would be secure and very convenient.
Score: 5 Votes (Like | Disagree)
martyjmclean Avatar
86 months ago
I’m keen as for this feature!
Score: 2 Votes (Like | Disagree)
adrianlondon Avatar
86 months ago
Not working for me. I'm not currently testing on my phone, although when I did try it a few weeks ago it didn't work there either. Running 10.14 dev beta 7.

This is the SMS I got:
mTAN for your new login:123456

And attached is a pic showing the field that expects it. No auto-fill available. It's a shame, as it would be a great feature. Hopefully they'll enhance it over time as Apple learns the format of various SMS authentication texts.

Attachment Image
Score: 1 Votes (Like | Disagree)

Popular Stories

iOS 19 visionOS UI Elements

iOS 19 to Have Some of the 'Biggest' Design Changes in iPhone's History

Sunday March 16, 2025 10:35 am PDT by
Apple is planning some of the "biggest iOS and macOS redesigns in its history," according to Bloomberg's Mark Gurman. In his Power On newsletter today, Gurman reiterated that iOS 19 will have a visionOS-like design with more transparent interfaces:The new interfaces will adopt the design principles introduced in visionOS, the software for Apple's Vision Pro headset. That includes greater...
airpods pro 2 gradient

AirPods Pro 3 Launch Now Just Months Away: Here's What We Know

Tuesday March 11, 2025 3:26 am PDT by
Despite being released over two years ago, Apple's AirPods Pro 2 continue to dominate the wireless earbud market. However, with the AirPods Pro 3 expected to launch in 2025, anyone thinking of buying Apple's premium earbuds may be wondering if the next generation is worth holding out for. Apart from their audio and noise-canceling performance, which are generally regarded as excellent for...
iphone 17 pro asherdipps

iPhone 17 Pro Max Rumors Allegedly Refer to 'iPhone 17 Ultra' Model

Friday March 14, 2025 7:56 am PDT by
If you've been following iPhone rumors over the last few years, you may remember reading reports that Apple flirted with the idea of introducing a super high-end "Ultra" model that would either replace its Pro Max device or sit above it in Apple's smartphone hirearchy. These reports appeared in the pre-launch iPhone 15 and iPhone 16 rumor cycles, but ultimately came to nothing. Now though, the...
iPhone 17 Air Size Feature

Ultra-Thin 'iPhone 17 Air' Rumored to Include These 12 Features

Saturday March 15, 2025 10:50 am PDT by
While the so-called "iPhone 17 Air" is not expected to launch until September, there are already plenty of rumors about the ultra-thin device. Overall, the "iPhone 17 Air" sounds like a mixed bag. While the device is expected to have an impressively thin and light design, rumors indicate it will have some compromises compared to iPhone 17 Pro models, including only a single rear camera, a...
Bent iPhone Air Feature

Apple Canned Larger iPhone 17 Air Model Over Fears of Bendgate 2.0

Monday March 17, 2025 4:07 am PDT by
Apple prototyped a larger ultra-slim iPhone 17 Air with a 6.9-inch display, but ultimately decided not to go ahead with the device because of fears that it could be susceptible to bending, according to a new report. Bloomberg reporter Mark Gurman, writing in his latest Power On newsletter: When it first started work on the phone, it prototyped a device with a 6.9-inch screen — matching...
iphone 16 pro models 1

Apple's First Foldable iPhone Estimated to Cost Nearly Twice as Much as iPhone 16 Pro Max

Monday March 17, 2025 6:42 am PDT by
In an investor research note today with British bank Barclays, analyst Tim Long said Apple's first foldable iPhone could have a starting price in the $2,300 range in the United States, which would make it by far the most expensive iPhone model ever. If the first foldable iPhone starts at $2,299, that means it would cost nearly twice as much as the iPhone 16 Pro Max, which starts at $1,199. ...
iPhone 17 Air Size Feature

'iPhone 17 Air' Rumored to Start at $899 With Surprisingly Good Battery Life, Camera Control, and More

Sunday March 16, 2025 9:05 am PDT by
Bloomberg's Mark Gurman today shared some new details about the rumored iPhone 17 Air. In his Power On newsletter, Gurman said he was told that the device may start at roughly $899 in the U.S., which means that it would occupy the same price point as the iPhone 16 Plus. This would make sense, as it has been widely rumored that the Air model will take over the Plus model's spot in the iPhone...
apple surveyor app

Apple Launches 'Surveyor' App for Apple Maps Data Collection

Friday March 14, 2025 10:38 am PDT by
Apple today launched a new app called Surveyor, which is designed to allow users to collect data like images of street signs and roadside details to improve Apple Maps. The app is not public facing and appears to be for use with companies that Apple partners with to assign mapping tasks. Downloading the app and opening it up directs users to "Open Partner App" to choose a task. Tapping on...
iphone 16e usb c feature

'iPhone 17 Air' is Step Towards Slimmer iPhones Without USB-C Ports

Sunday March 16, 2025 9:36 am PDT by
Apple considered launching the iPhone 17 Air without a USB-C charging port, according to Bloomberg's Mark Gurman. In his Power On newsletter today, Gurman said that while Apple ultimately decided against making the iPhone 17 Air its first iPhone model without a charging port, the idea is still on the table for future iPhone models. He said the iPhone 17 Air will "foreshadow a move to...