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

Option to unlock when focusing credentials field #163

Closed
phoerious opened this issue May 17, 2018 · 8 comments
Closed

Option to unlock when focusing credentials field #163

phoerious opened this issue May 17, 2018 · 8 comments

Comments

@phoerious
Copy link
Member

phoerious commented May 17, 2018

Expected Behavior

When I click a credentials field and the database is locked, KeePassXC should provide me with a simple way to unlock the database to request the credentials.

Current Behavior

I always need to unlock first and then go back and reload before my passwords are filled in. In combination with automatic database locking, Auto-Type is almost always faster, so I find myself not using KeePassXC-Browser at all.

Possible Solution

This could be presented as an input field dropdown in the same way the actual password selection would be presented. But maybe colourize it a little different (grey text, little icon or so). It should say something like "Database locked, click to unlock".

Steps to Reproduce (for bugs)

  1. Lock database
  2. (Try to) use browser plugin

Debug info

KeePassXC - 2.3.3
keepassxc-browser - 1.1.3
Operating system: Mac/Win/Linux
Browser: Chrome/Firefox/Vivaldi/Chromium
Proxy used: YES/NO

@varjolintu
Copy link
Member

Maybe this could provide similar behaviour to Auto-Type: keepassxreboot/keepassxc#1904. Should work great after #153 is merged.

@powerman
Copy link

KeePassXC-Browser Version: 1.3.0
KeePassXC Version: 2.3.4

Is #153 already included in this version? If yes, then how to test it - maybe I need to use some hotkeys in browser or something? I think best UX is opening database unlock dialog when login or password field gets focus, without needs to press any hotkeys.

@varjolintu
Copy link
Member

It is included. But that only retrieves the credentials automatically after unlock. It doesn't provide any additional method for unlocking.

If unlock dialog would appear on every username or password field input, that would be really annoying if you want to browser the web database locked.

@powerman
Copy link

If unlock dialog would appear on every username or password field input, that would be really annoying

Not on every, only on focused ones. If I've focused username or password field then I anyway going to unlock KeePass right now. Same is true if I've opened login page and it has auto-focused username field.

Probably there are legal use cases when it'll be annoying - not sure which ones, how annoying it will be and is it possible to solve this by making something configurable or more smart… but what I know for sure - right now browser plugin isn't really useful because pressing auto-type hotkey and then entering password to unlock KeePass is much more easier (just 2 steps) way to login than:

  1. click on username field just to realize KeePass is locked (optional step 0, but happens often)
  2. click on extension button
  3. click "Reopen database"
  4. enter password to unlock KeePass
  5. click on username field
  6. click on proposed username in drop-down
  7. click "Login" button

@varjolintu
Copy link
Member

(Sorry if this is a double comment. GitHub is messed up.)

But what if the page has the username field focused by default? This could cause unlock request on every tab change or page load..

When keepassxreboot/keepassxc#1904 is merged with 2.40, the same unlock dialog can be used with Auto-Type. Just a keyboard shortcut the the extension would then work identically. Of course the unlock dialog can be triggered when trying to do a fill when database is locked.

@powerman
Copy link

But what if the page has the username field focused by default?

Yes, it may be inconvenient in this case. But here we've "may be" and unclear amount of such cases - comparing to current situation "UX is so much bad what it makes no sense to use KeePassXC-Browser at all" this feature still looks like a huge improvement. You can at least implement it and try to use it yourself first, to see how many issues (if any) you'll get.

I'm not a big fan of adding extra on/off option for each feature, but this also may be a way to solve this issue (if it's not imaginary), and so is blacklist. Another possible solution (not sure how reliable it'll be) is to ignore current focused field found after page loading completed and activate this feature only when focus changes after page load.

Not sure how keepassxreboot/keepassxc#1904 may affect current issue… I don't even sure I understand what it does, because on my system "Reopen database" already always show same unlock dialog as auto-type or manual click on KeePass icon - maybe it fix something in other environments (I'm using Linux/Fluxbox).

@varjolintu
Copy link
Member

@powerman I agree. Adding each feature with on/off options is not a good solution. I can do some testing based on your suggestions.

The PR changes the unlock dialog to the same with global Auto-Type. For example, in macOS the basic unlock dialog always focuses the whole KeePassXC and brings it to the front (Linux is not affected by this). That change makes sure only the popup dialog is brough front and KeePassXC stays in the background. Without the new popup dialog, KeePassXC might still be the active application even if the window is put in the background, and you have to focus your browser again after unlock.

@varjolintu
Copy link
Member

This behaviour is already implemented with the Username field icon.

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

No branches or pull requests

4 participants