Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autofill OTP passwords #34

Closed
ghost opened this issue Dec 13, 2019 · 13 comments
Closed

Autofill OTP passwords #34

ghost opened this issue Dec 13, 2019 · 13 comments

Comments

@ghost
Copy link

ghost commented Dec 13, 2019

May I suggest some features?

  1. A small quality of life upgrade would be that to merely double tap a token in the app should directly copy the code to the clipboard, rather than having to tap and then press Copy. I think most other Auth apps I’ve tried has this design (though trivial change).

  2. An incredibly convenient option would be for the Tofu app to automatically send the current code for the relevant token to the clipboard, similar to how when signing in to a website with a text message verification code it appears automatically in the clipboard (without having to leave the Safari app). Would this be feasible?

@ghost
Copy link
Author

ghost commented Dec 15, 2019

Silly me, there's a search function already... Calling myself stupid so nobody else needs to. Done. :)

@calleluks
Copy link
Collaborator

Hey @nistan123, thanks for the feedback.

merely double tap a token in the app should directly copy the code to the clipboard

Right now, when the contextual menu disappears after tapping the Copy item, I think people have the expectation that the code was copied to the clipboard. If we didn't display a contextual menu and instead copied codes on double tap, I'm not sure how we could create this expectation or otherwise provide feedback in a way that's in line with the rest of the system.

[...] the Tofu app to automatically send the current code for the relevant token to the clipboard [...] Would this be feasible?

Unfortunately, I don't think that's possible with the currently available APIs.

@dietofworms
Copy link

To extend upon OP's request regarding copying the code automatically. Can we take a look at Google's Authenticator application for inspiration? There, you can simply tap a code and it will automatically copy it to your clipboard. I think this feature would be really good to implement in Tofu.

@ghost
Copy link
Author

ghost commented Dec 23, 2019

Just to add an example you may want to have a look at re. suggested feature #3.
The iOS app 1Password offers this exact feature. After installing the app, go Settings > Passwords and Accounts > Autofill Passwords, and then you may add the 1Password app.
Maybe have a closer look at how they do it?

@ghost
Copy link
Author

ghost commented Dec 26, 2019

The iOS app 1Password offers this exact feature. After installing the app, go Settings > Passwords and Accounts > Autofill Passwords, and then you may add the 1Password app.

Can update that this feature has not worked at all in 1Password. So perhaps it is impossible to do this currently...

@calleluks
Copy link
Collaborator

Regarding one-tap copy: I don’t think the way Google Authenticator provides feedback that it copied the code to the clipboard fits in well with the rest of system. If you have suggestions for how to do this better, I’d love to hear them.

Regarding 1Password and autofill: If I have understood things correctly, the autofill api lets apps pre-register entries that can be auto filled. I don’t see how this would work with short lived one time passwords.

@ghost
Copy link
Author

ghost commented Dec 27, 2019

Regarding 1Password and autofill: If I have understood things correctly, the autofill api lets apps pre-register entries that can be auto filled. I don’t see how this would work with short lived one time passwords.

371BDDD4-CC4E-4F9F-83B6-9A288C5AC117

Although I haven’t gotten it to work myself, clearly it is supposed to, if you refer to the image attached.

Imagine how smooth the user experience would be to simply log in to websites and never having to even open Tofu, but just stay in Safari?
It could set your app apart from the rest if you implemented this (and it actually works).

@calleluks
Copy link
Collaborator

Imagine how smooth the user experience would be to simply log in to websites and never having to even open Tofu, but just stay in Safari?

I agree that it sounds great! I still don't see how it would work, though.

The way I interpret this 1Password feature is that after autofilling your username/email and password, 1Password will copy the OTP to your clipboard for you to then paste into the OTP field. This seems reliant on getting a callback from the autofill system, and I'm not sure how Tofu would handle that?

@ghost
Copy link
Author

ghost commented Dec 27, 2019

This seems reliant on getting a callback from the autofill system, and I'm not sure how Tofu would handle that?

Sorry to say I know nothing about programming/coding, I’m only a lowly consumer. But I found a similar open source project on github which claims to be using auto-fill 2FA https://github.com/FoxAuth/FoxAuth. Perhaps have a look at their code? Although this is not for iOS but Mozilla.

@ThinkChaos
Copy link
Contributor

Regarding 1Password and autofill: If I have understood things correctly, the autofill api lets apps pre-register entries that can be auto filled. I don’t see how this would work with short lived one time passwords.

The API actually launches an app extension that can do more than just register entries. For instance KeepassTouch, a password manager based on MiniKeepass, has an autofill extension that asks the user to unlock the database and then can fetch relevant username/password combos.

What I'm not sure about is if iOS would allow the autofill extension to run for non username/password fields. I think 2FA code inputs generally don't match username nor password detection.

@calleluks calleluks changed the title Suggested features Autofill OTP passwords Mar 11, 2020
@bre7
Copy link

bre7 commented Dec 19, 2020

OTP autofill on iOS only works for SMS login flows. https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_a_text_input_view

1Password for example, autofills user/password and sends the OTP code to the clipboard.

@calleluks
Copy link
Collaborator

I don't think this is technically possible right now. Let's re-open this if this changes!

@mietzen
Copy link

mietzen commented Mar 24, 2024

I found this old pull request: mattrubin/Authenticator#234
Perhaps this would be a possible workaround, we still have to make multiple clicks/taps but we don't need to switch the app / lose focus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants