twofas / 2fas-ios

Source code for 2FAS iOS app
GNU General Public License v3.0
505 stars 38 forks source link

Feature Request: Support autofill on iOS #48

Closed ryandens closed 11 months ago

ryandens commented 11 months ago

👋 New user here - thanks for making a great app! I was wondering if there was any interest/history in supporting auto-filling OTP codes on iOS (similar to how this was request for 2fas-android in https://github.com/twofas/2fas-android/issues/15). I understand that neither Apple/Google work with multiple password managers configured simultaneously. It looks like 1password's OTP autofill works by copying the OTP to the clipboard when a password for that site is auto-filled, which makes sense since they're already configured as the password manager, so they know when a password is auto-filled.

For those interested in advocating for this on iOS, I also found this support discussion on Apple's forums.

I wondered if there was any exploration of this as a feature before, or if any alternative mechanisms are possible. I suspect it makes sense to simply close this issue while we wait for iOS support, but wasn't sure if I missed something

adocyn commented 11 months ago

Hi @ryandens We would if we could 😄 There's API for Passwords autofill but there is none for OTP. You can make 2FAS default OTP app and it will be opened when otpauth:// link is called (or found in QR Code), but no way to extract a code for a website. That's why we've added Browser Extension.

ryandens commented 11 months ago

Thanks for the info! A browser extension for iOS safari would be pretty awesome, but totally understand if that's out of the scope of this project/the extension project.

My use case is there's certain sites I don't like to stay logged in on/download the app for, so I find myself doing MFA for them in iOS safari pretty frequently. Definitely a niche use case though