From #390:
Also, it would be nice if min remembered my passwords... i made another bash program for this too but perhaps min could integrate with KDE's wallet or something. Not sure if a standard exists for this or perhaps gnome and kde have different incompatible interfaces for this.
Sorry about the duplicate issue @PalmerAL - I'll go ahead and respond here then. This library might be of some help to get this feature added. https://github.com/buttercup/buttercup-core
No news on this one?
I think that those days your default web browser has to support password management.
Most of us have probably many credentials from many website.
This makes almost impossible to remember all of theme. Unless you always use the same password which is definitely not a good security practice.
Personally, I use random generated password remembered by the browser.
I would love to switch to Min but I really mist this feature.
@alexandrestein I'd be suspicious if every browser out there supported saving passwords... It's a responsibility which needs to be carefully taken care of.
@code-hunger maybe not every browsers but many of them.
I'm using it in chromium and Firefox.
I checked about brave and Opera and both dose.
I guess edge, ie or Safari does it as well.
This makes probably around 95% of the browser usage which supports password management.
Yeah, I tend to agree with @code-hunger here. Password management would be a nice feature to have, but it's tricky to do correctly, and the consequences if you do it wrong are pretty bad (exposing passwords to the wrong websites, etc.) Maybe in the future it will make sense to implement this, but it would require a lot of time and thought, and I'm not sure it's something I really want to be responsible for.
In the meantime, you could probably make a script to autofill passwords with a userscript if you wanted to.
@PalmerAL thank you for this answer.
From this point of view I could agree.
This can easily became dangerous.
It doesn't look out of reach to parse the actual domain and to propose all saved password which are saved with the exact same domain and those which are saved for the parent domains.
Some tools parse domain name like this one.
This can be an helper to look for related domains.
It's not a big deal, I'm not dying for it.
I was just wondering if there was any improvement.
This has been requested enough (see https://github.com/minbrowser/min/issues/532#issuecomment-458806491) that I'm re-thinking whether we want to do this. Like I said before, we'll have to be really careful that this is secure, so I think there's a couple things we should do to simplify this and reduce the risk:
getURL returns the wrong results, or possibly if there's a race condition while a new page is loading), we could fill in the wrong password, which could potentially be abused. As a result, I suggest that instead of auto-filling, we show a banner at the top of the screen with something like "Use your password for [sitename]? [yes] [no]", and you would have to click to fill in the password for that site. This would make it slightly less convenient to fill in passwords, but since most sites remember your login for a long time, I don't think it should be a big issue, and it would help mitigiate a lot of potential security issues._To preface, my background in dev is very little (in the context of software development, it's zero), so apologies if anything I suggest makes no sense, has already been explored, or I'm just massively oversimplifying it. (I'm hoping at least something in there will light a spark for someone who knows a bit more! "Well no... that's ridiculous, but wait... what if we did this?")_
// Is it at all possible to outsource the heavy-lifting of password storage/management/security to a choice of a few third-party vaults (e.g. LastPass)?
_Station app is trying to implement something similar, but so far they've only managed to integrate 1Password. They are also an open source browser, but they've reimagined it as a sort of "web-app command centre". It's probably a totally different setup, so I don't know if that's a useful reference or not._
// Or is there at least a way to provide the option to use something other than the built-in vault?
_Regarding that last point though: during my research, everyone seemed to have different feelings/ideas about what they considered secure or risky, and who they trusted login info with. Some may prefer this, some may prefer that, others couldn't give a hoot either way and were content with internal storage. Putting all my eggs in one basket could possibly a terrible idea down the track, but it's a personal choice. I guess the main takeaway at least would be that there seems to be no single agreed solution for password security; it just comes down to personal preference, so the need to give users the option may be something to be considered._
––
_(@PalmerAL, if you notice a double-up, I had also written about this at length in a survey response, before I realised there was already a thread for it, but I've expanded on that response a fair bit more as you can see)_
_"I am sorry I wrote you such a long letter, but I didn't have time to write a shorter one"_
_- Somebody old/famous_
Thanks for the ideas! In theory, it should be possible to do something like that, but I'm not sure how practical it would be.
We could create our own password manager API like iOS does, but we'd have to convince every popular password manager to support that, and that's unlikely to happen considering we don't have that many users (yet).
Currently, most password managers provide browser extensions, so if we added support for the Chrome browser API's, we could support every password manager (and a ton of other extensions as well). However, this is a really complex project to do, both to initially implement, and to ensure that our implementation remains compatible with Chrome's. I don't think I have enough time to do this, but if someone is interested and willing to do it, I'd happily accept PR's for it.
The Station approach is interesting - it looks like 1Password provides a command-line tool to access your passwords, and they've written a wrapper to use that in Node. That would actually be fairly simple to implement, and it looks like Lastpass and Bitwarden have CLI tools as well (although having to write a separate integration for each password manager isn't ideal, we could probably make a library that detects whatever is installed on your system and exposes a unified API for them).
If we were to store passwords ourself, we would likely either use the OS-provided keychain API's, or use an existing and well-tested library to do this (although I'm not sure what that would be yet), so I don't think there's anything inherently insecure about doing it ourself (although it definitely is something I'm concerned about and that we need to be careful with). I also wouldn't expect this to have any significant impact on memory usage.
If you have links to the articles you read about browser password managers being insecure, I'd be interested in reading them. There definitely have been exploits in browser-based password managers before, but I'm not sure they're inherently insecure compared to a separate app. (This article did make the point that autofill is a bad idea, which I would agree with, which is why I mentioned above we likely won't do that).
Anyway, thanks for the suggestions! There's definitely a lot to think about with this. The CLI-based approach sounds like it would work better than I was expecting, and it has the benefit of working with people's existing tools, rather than forcing you to adopt an entirely new password manager; we might want to consider doing that.
Working on a simple POC/prototype with Bitwarden-CLI integration:

There are obviously still things to do and improve, so I would gladly accept any input/suggestions while I'm working on it. Or anyone can just clone the branch and use my code in whatever way they like :)
@cog1to This is really cool! Interacting with the CLI is simpler than I thought, which is nice. I definitely think that we could integrate this and have it work well.
First, I would suggest that instead of having a "use bitwarden" preference, we make it a "use password manager" preference, with a value of "bitwarden"; the settings page could have a dropdown menu to pick a password manager. This has the downside that you would only be able to enable one password manager at once, but I think most people aren't using multiple password managers anyway, and I think that would allow us to significantly simplify the code for this feature.
I think the first challenge to figure out with this is how setup should work. I assumed that the CLI came bundled with the password manager, but it's actually a separate download, and the instructions for installing it are fairly intimidating: https://help.bitwarden.com/article/cli/. I expect that a lot of people using Min aren't going to have enough experience with the command line to be comfortable doing this, so we need a way to simplify installation. One idea I have is to do something like this:
If it isn't, show a dialog box sort of like this:

When you drop the tool in the box, make a copy of it and place it in Min's user data folder
That way, we can ensure we always have access to the CLI, without requiring users to know anything about the command line.
The forced-vs-unforced thing is also really confusing to me, because there's no indication in the UI that you need to unlock the vault, and it's not obvious that you need to use the keyboard shortcut instead. I think we should just show a notification somewhere in the UI that you need to unlock, although I'm not exactly sure where it should go yet.
@PalmerAL thanks for the comments.
I kind of agree with the single vs multiple password managers: having an ability to have multiple of them enabled might be an overkill. I'm going to refactor this stuff to have a single dropdown selection.
Regarding forced-vs-unforced, this is a little more debatable. You're probably right about this. I was mostly looking at qutebrowser userscripts when implementing this, and they all do work with keyboard shortcuts to initiate the feature.
We can try to add a top/bottom info bar (a-la Downloads manager) to show a message, like Min has detected a login form on this page, click <<this>>/type <<shortcut>> to unlock the password manager and use autofill.
There's also a related issue with form detection. The problem with relying on just the page load handlers is that it will always miss JS-generated UI that some sites use (Reddit, for example). If we find a reliable (and most importantly - fast) way to re-evaluate HTML on DOM change events, we might get rid of the shortcut. So far I wasn't able to do so in a way that would satisfy my expectations.
Because of that, I would still leave the shortcut as an option to manually activate autofill.
I've added Bitwarden setup dialog:

Tried experimenting with auto-detecting dynamically loaded forms on web pages today (with the help of MutationObserver), and I don't like the results so far. While it was mostly working, there were some cases when it either didn't work at all (Reddit's login popup), or was buggy and caused a severe performance degradation due to infinite update cycles (HumbleBundle site). So I'm still leaning towards manually triggering password fill via keyboard shortcuts.
Seems to work fine for static pages though (and even pages with user/pass fields loaded but hidden by default).
@cog1to It's looking good!
Regarding form detection, I wonder if we could listen for the focus event on the document, and then check if whatever was focused is a username/password field. I think that would have a lot of benefits:
Also, I kind of wonder about making the unlock and tool setup dialogs overlays in the main window instead of separate windows. I'm not as sure about this, but it seems like it would simplify things a bit (since you could reuse the main window styling, and reduce the need to send data over IPC messages).
I'll try to look over the rest of the PR soon when I have more time.
@PalmerAL regarding input fields detection, that's a decent option. I'm a little worried about being too disruptive though.
We won't be able to easily differentiate between Sign In and Sign Up forms, so potentially the unlock dialog will be popping up even in cases when user has no intention to fill the field. Same problem for cases when user simply doesn't have credentials saved in the password manager. Since we cannot know beforehand if credentials are there, we risk showing the dialog with no purpose and to the annoyance of the user.
I'm more inclined to let users do stuff manually in such cases instead of guessing that what we do might be helpful.
Let's list our options here:
Pros:
Cons:
Pros:
Cons:
Pros:
Cons:
As I said, I'm more inclined to 1, but that's my personal preference. As most engineers, I'm not very good at UX :) So I can refactor to whatever we agree to be the best approach. Or maybe we can come up with a fourth one.
I can definitely see how that would be annoying; I do wonder how common the signup/no credentials cases are compared to the login case, but I doubt there's any way to get data on that. (Actually, now that I think about it, what I mentioned in my last comment is how the master password dialog works in Firefox, and it can be fairly annoying).
I think it's really important that it be obvious how to use autofill, without needing to read any instructions. So just doing 1 probably isn't a good option.
One thing that might work is a combination of a keyboard shortcut + focus detection:

I think that might be more obvious to use, without creating as much disruption if you don't want to autofill.
Hi @PalmerAL
The CLI-based approach sounds like it would work better than I was expecting
Awesome! I'm really looking forward to how this pans out. Thanks for your work on this @cog1to and @PalmerAL
I think it's really important that it be obvious how to use autofill, without needing to read any instructions. So just doing 1 probably isn't a good option. One thing that might work is a combination of a keyboard shortcut + focus detection.
We won't be able to easily differentiate between Sign In and Sign Up forms, so potentially the unlock dialog will be popping up even in cases when user has no intention to fill the field.
Lastpass has trouble diffrentiating between sign-up and sign-in too, for example:

Currently, most password managers provide browser extensions, so if we added support for the Chrome browser API's, we could support every password manager. However, this is a really complex project to do
Totally! I have no real desire for chrome extensions to be implemented in Min, given that there are probably enough userscripts out there that could cover most needs (although I understand extensions can do more). To me, Pinterest's browser extensions are a pretty good example of why I understand that extentions are probably just a nightmare to be avoided:
If there's some other use-case that warrants it, go for it, but I'm not hanging out for it myself.
If you have links to the articles you read about browser password managers being insecure, I'd be interested in reading them.
They were all mostly comments made in forums by people who (allegedly) work in online security. I can't really remember where I read them (and probably aren't really citeable sources haha), but the article you linked to pretty much sums up the points I think they were making – for them they felt the autofill flaw was a deal-breaker.
They – whoever "they" are – may have also flagged the way passwords were stored for many browsers...? But I could be misremebering. That may have also changed since then. Sorry I don't have anything more substantial.
hey guys, thanks for the feedback. I tinkered a little with the implementation of inline button, here's the basic prototype:

there are few problems/issues with current code that I'd like to address:
onchange events from the input elements, but current solution is not 100% error-free. seems like different pages listen to different eventsfontawesome features for it, but could not figure out how to preload bundled CSS and fonts via preload scripts, so right now is just a static SVG. any help here will be appreciatedIt's looking good!
there are still issues on some websites with detecting field value changes. some sites use JS events on input fields to detect changes, so without firing/emulating proper events pages could show 'empty username/password' errors. I partially fixed it by manually firing onchange events from the input elements, but current solution is not 100% error-free. seems like different pages listen to different events
Can you share some examples of sites that do this?
the unlock button is not very flashy. I wanted to add some kind of hover effect, and also re-use fontawesome features for it, but could not figure out how to preload bundled CSS and fonts via preload scripts, so right now is just a static SVG. any help here will be appreciated
Loading fontawesome in each tab isn't a good idea, because it increases page loading time and could also cause conflicts if the page itself uses fontawesome already. However, it should be possible to do everything that FA does with normal CSS. For hover, you could probably just add a JS listener to it that changes the style attribute. I'm not sure it needs to be any flashier than that; what else were you thinking of?
I'll try to look at the rest of the PR soon.
Can you share some examples of sites that do this?
My test target for that specific issue was HumbleBundle site. Before I did an update with firing 'onchange' event, Atlassian login page was behaving the same way.
Loading fontawesome in each tab isn't a good idea, because it increases page loading time and could also cause conflicts if the page itself uses fontawesome already.
Yeah, that makes sense. Pushed a small update with hover effect.
@cog1to 's PR has been merged, so Bitwarden is fully supported now. Here's some screenshots of what the integration looks like:



Copying from the PR:
I'm hoping to support more than one password manager when this launches, so I'm going to try to add support for another one (probably 1password) over the next couple weeks, but if that ends up taking too long, I'll go ahead and release the next version with just Bitwarden. This should be released fairly soon either way.
I have a question regarding Bitwarden.
When does it sync the vault?
Because I have added a new entry which does not seem to be synced. I also tried restarting min. I even waited a while so that I got ask if I want to continue in the task I left the last time.
And the most important thing: I also checked if I spelled the domain correctly.
But still min can't find a corresponding entry.
As far as I could tell from the code (correct me if I'm wrong), Min doesn't automatically sync the vault.
Min password management works by utilizing a CLI tool that actually does the heavy lifting like logging in and syncing your vault. In your case running the command bw sync in a command line interface should work.
This is interesting; we have a forceSync() method; but it looks like I accidentally deleted the code that was calling it in a54c51240805dc8e57f612db462e04c83da51cc1. I guess we should add that back.
In the meantime, if you have bitwarden installed globally, the command Syndamia mentioned should work; if you installed it using the setup dialog in Min, you'll need to run one of these:
~/library/application support/min/tools/bw sync on macOS
\users\username\appdata\roaming\min\tools\bw sync on Windows
/home/username/.config/Min/tools/bw sync on Linux.
As far as I know, 1password syncs automatically (and there's no sync command), so it shouldn't be affected.
Fixed in 9f94fd398142814e3914af6ecc2921e7740cbc97. Sorry about that!
(You will still have to restart Min for new credentials to show up).
Haha. Syncing manually worked. Thanks for the tipp. Without the path to the tool I wouldn't be able to figure out how to run the command since I have installed it in Min.
What exactly does the forceSync() Method do? Will it sync automatically on every new session of Min?
With the fix, it should sync every time you re-enter your master password (which would happen the first time you try to autifll after restarting Min).
forceSync basically just runs the same bw sync command.
Not sure if it would be better suited as a feature request, but:
It would pretty awesome if min would integrate with pass
Most helpful comment
@cog1to 's PR has been merged, so Bitwarden is fully supported now. Here's some screenshots of what the integration looks like:
Copying from the PR: