[macOS/iOS] Add support for SMS autofill from iPhone
Categories
(Toolkit :: Form Autofill, enhancement, P3)
Tracking
()
People
(Reporter: acreskey, Unassigned)
References
Details
Attachments
(1 file)
47.61 KB,
image/png
|
Details |
Safari on MacOS (and iOS) includes a useful feature: the option to autofill SMS security forms where the SMS code was sent to the user's iphone.
This is a valuable feature because many banking, financial, and other services use SMS security codes for 2FA (even though that's not ideal).
This saves a cumbersome copy-and-paste on what is a many-times a day task for some people.
More details here.
https://support.apple.com/en-ca/guide/safari/ibrwa4a6c6c6/mac
I believe this is supported for third party apps as of MacOS Big Sur.
https://the8-bit.com/macos-third-party-2fa-autofill/
Updated•2 years ago
|
Comment 1•2 years ago
|
||
Thread at https://twitter.com/plc/status/1361556206397968385 suggests that this should be tied to autocomplete=one-time-code
, though https://github.com/whatwg/html/issues/4586#issuecomment-608253383 suggests Safari also uses heuristics. What's less clear is how we'd get the value out of the Messages app, or communicate with macOS that we want it to do so. There's a specific content type that can be used for native text boxes - https://developer.apple.com/documentation/appkit/nstextcontenttypeonetimecode - but I don't know that we use native text boxes and/or if a lower-level primitive is available...
Reporter | ||
Comment 2•2 years ago
|
||
I doesn't look like Chrome on MacOs supports this feature either.
Comment 3•2 years ago
|
||
It might be worth looking into the UIPasteboard to see if this is available as structured information in it.
https://developer.apple.com/documentation/uikit/uipasteboard?language=objc
They have pasteboard types, which could have this data in a structured way.
Comment 4•2 years ago
|
||
(In reply to Greg Tatum [:gregtatum] from comment #3)
It might be worth looking into the UIPasteboard to see if this is available as structured information in it.
https://developer.apple.com/documentation/uikit/uipasteboard?language=objc
They have pasteboard types, which could have this data in a structured way.
That looks like it's a UIKit API, so it's not available on macOS, right? The macOS equivalent, NSPasteboard
, doesn't seem to mention anything in docs. But also, my understanding is that the autofill in the screenshot happens before you copy anything into the clipboard, so I'm not sure that apple would use clipboard APIs for this...
http://codeworkshop.net/objc-diff/sdkdiffs/macos/11.0/AppKit.html has the NSTextContentTypeOneTimeCode
addition but nothing else that looks related for macOS 11. A quick check of other API changes in 11.0 also didn't seem to flag anything related. :-(
bug 1650212, which is for generic pwmgr integration with keychain, is related. There too people are suggesting integration with text fields, which I think isn't going to work for us because those aren't used for web content (or, really, for most of the browser UI). Markus or Stephen can maybe confirm/deny?
Comment 5•2 years ago
|
||
In WWDC video, NSTextContent
protocol has contentType property. But it is for NSTextField
and NSTextView
, so we don't know how to implement it on custom NSView
and it is really used.
Comment 6•2 years ago
|
||
As mentioned in comment 5, this will require some investigation.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Updated•1 month ago
|
Description
•