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

Add an "Autofill password" context menu action #1664

Merged
merged 1 commit into from
Oct 2, 2020
Merged

Add an "Autofill password" context menu action #1664

merged 1 commit into from
Oct 2, 2020

Conversation

fmeum
Copy link
Contributor

@fmeum fmeum commented Jul 21, 2020

It would help users if they were able to let their password managers enter passwords into terminal sessions for them. While there are legacy solutions for this that already work with Termus (accessibility services and custom IMEs), as of Android Oreo, the preferred method for this usecase is using the system-provided Autofill API.

This commit adds a context menu action that sends a password field Autofill request to the currently registered Autofill service. Triggering the Autofill UI requires an explicit user action (due to importantForAutofill="no") and the context menu action is only shown when Autofill is both supported and enabled.

@finagolfin
Copy link
Member

Seems like a useful feature, I think @fornwall just needs to sign off.

@msfjarvis
Copy link

Is there anything blocking the merge of this?

@finagolfin
Copy link
Member

@fornwall or @xeffyr, if one of you will sign off on adding this feature, I will review the code and get it merged.

@Grimler91
Copy link
Member

@buttaface go for it, as long as it is tested and no obvious side-effects can be found, it should be fine

@finagolfin
Copy link
Member

Will do.

Copy link

@Poe532 Poe532 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello world

@fornwall
Copy link
Member

fornwall commented Oct 2, 2020

This looks really nice - thanks!

@fornwall fornwall merged commit 8c80efb into termux:master Oct 2, 2020
@msfjarvis msfjarvis deleted the autofill branch October 2, 2020 08:21
@finagolfin
Copy link
Member

Sorry about the delay. The patch seemed fine to me, but I just wanted to find another device on which I could run this apk and test the feature, but never got around to that.

@nerd190
Copy link

nerd190 commented Mar 4, 2021

This is a nice feature, but I was wondering if it would work the other way?

  • obtain password from a CLI util like pass (password-store) and autofill a GUI app (like a browser etc).

I use a CLI password manager (pass) and would LOVE it if this feature worked both ways.
Currently I have a script that reads my clipboard, extracts the domain name, then if it matches an entry in pass it copies the websites password to my clipboard.
It works for websites only, not in applications too, this would be much better than my script!

@msfjarvis
Copy link

This is a nice feature, but I was wondering if it would work the other way?

It will not. The code here invokes the system Autofill framework, and does not actually involve the clipboard at all so copying to and from it isn't related to this PR at all.

Do you have a specific reason to go through all the pain of using the pass CLI on Android rather than a dedicated client for pass like android-password-store/android-password-store? If the app is lacking something then I'd like to know.
(Disclaimer: I'm the lead maintainer on APS)

@nerd190
Copy link

nerd190 commented Mar 5, 2021

@msfjarvis
(Disclaimer: I know you are, I'm actually a huge fan of all of your work, in fact, as a root user, I've been following your work for years!)
Sorry for misunderstanding the technicalities.
I have tried your Android port before, a couple times, I always stuck with "Keepass2Android Offline" for its features/usability, but I wrote my script and uninstalled that too as it works smoothly for website signin/oauth as I can just hit share, but not in an app like "GitNex" (my codeberg client) as I cant share a URL, but it doesnt take long to click home, termux, pass -c codeberg, (enter password), double tap recents button to return to app.
Been longer than a year since I tried your app so I'll download it again, this very cool feature may be enough for me to scrap my script. 👍

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

Successfully merging this pull request may close these issues.

7 participants