Open Bug 1794105 Opened 2 years ago Updated 1 day ago

[macOS/iOS] Add support for SMS autofill from iPhone

Categories

(Toolkit :: Form Autofill, enhancement, P3)

Desktop
macOS
enhancement

Tracking

()

People

(Reporter: acreskey, Unassigned)

References

Details

Attachments

(1 file)

Attached image sms_autofill.png

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/

Component: Untriaged → Form Autofill
Product: Firefox → Toolkit

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...

I doesn't look like Chrome on MacOs supports this feature either.

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.

(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?

Flags: needinfo?(spohl.mozilla.bugs)
Flags: needinfo?(mstange.moz)
See Also: → 1650212

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.

As mentioned in comment 5, this will require some investigation.

Flags: needinfo?(spohl.mozilla.bugs)
Priority: -- → P3
Severity: -- → N/A
Flags: needinfo?(mstange.moz)
Summary: [macOS] Add support for SMS autofill from iPhone → [macOS/iOS] Add support for SMS autofill from iPhone
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: