Default usernames

Thanks for the comment. Unfortunately I don’t have time to change it now. Can do it in July or maybe someone will be kind to do it earlier :slightly_smiling_face:

1 Like

Hey @michalchecinski, thanks again for the PR. I was going to post this response on Github, but thought I’d move it here as this thread is more active in the community.

We agree this would be a great feature to add to Bitwarden, however the implementation would need to change a bit before it could be merged. We’re conscious that we’re always adding elements to the UI (across all clients), so we want to minimise UI clutter when adding any new features, especially quality-of-life features like this one.

The following solution would be more suitable:

  • change the existing username field to a datalist element, as suggested above. As part of this, I would ask that you investigate compatibility issues with older browsers and make sure that it doesn’t break them. (Even if it just reverts to an input element where a datalist is not supported, those users don’t get the benefit of this feature, but it doesn’t break existing functionality either.)

  • remove the Default Usernames dropdown, as this is no longer needed

  • pull the datalist suggestions from the top 5 most commonly used usernames in the user’s vault. I imagine this would be determined by an algorithm when the vault is unlocked or when ciphers are updated. The user would not be required to manually specify default usernames. This would remove the need for changes to the server, or for the new Settings page in the web interface. All changes would be client-side.

  • these changes would need to be replicated across all angular clients, i.e. browser, web, desktop. Common logic (such as determining the top 5 common usernames) would be centralised in jslib to reduce duplication of code.

Happy to discuss further if you have any questions or if you see any problems with this approach. (Or if anyone else has any feedback.) I also appreciate that you’re doing this in your spare time, so if it waits until July or if this is too large a scope for you, that’s fine too.

6 Likes

I would also want several usernames for the same site. Sometimes you have to enter two different versions of the username on the same domain, such that as your e-mail address when you first login and the username at an other place.

It can look like this:

It shows up as duplicate passwords, but really it is just the same username entered in slightly different formats on the same page.

@Essadon, this contribution wouldn’t change the fact that there is 1 username per login item. It would give you multiple suggestions for common usernames, but you’d still have to choose one and only one.

I think what you’re looking for is maybe Add "Username" and "Email" as separate entries.

1 Like

I know it’s not exactly the same thing, but it is similar and not too different/difficult to implement.

I obviously don’t want to have several entries with the same password.

Thanks for the input. I definitely want to finish the job, but I’ll have time to do it in July. If someone else could help earlier, I’ll appreciate it :slightly_smiling_face:

4 Likes

I have done the suggested changes. Web, browser and desktop apps have those. Only the mobile version left

4 Likes

Mobile version halfway done. The Xamarin.Forms doesn’t have an equivalent of the datalist HTML component. As I’m not Xamarin expert maybe someone from the Bitwarden team could help me with this?

3 Likes

@mp-bw is super busy with FIDO2 work, but he may be able to assist with specific questions if you have them.

2 Likes

So my question is how to replicate behavior like HTML input with datalist in Xamarin.Forms in a best way. I’ve seen the custom controls implementing search functionality, but maybe there is a better solution.

Thanks for the update @michecinski! I’ll check out your PRs for the Angular clients and then consider what we can do for mobile if you’re still unsure.

2 Likes

Came here from this feature request: Autocomplete username when creating new entries - #10 by cmdkev

Just want to say it would be a great feature! Part of why I use BW is to reduce the number of clicks/keypresses as my hands slowly descend into arthritis doom. Typing email addresses every time is quite frustrating.

6 Likes

Have been thinking about this for a while and stumbled across. Really excited to see this happen!

looking forward to this update

1 Like

Hi all, I’m really interested in adding this feature, to the point I’d want to complete the current implementation. I’ll try to figure out what’s left to do but it would be really cool if @michecinski or @eliykat could summarize it
UPD:
From a quick glance, to keep track for myself:

  • Figure out how to work with github forks (I’m a GitLab user and used to just having feature branches in one same repo for every project)

  • web

    • merge master to the fork
  • jslib

    • merge master to the fork
    • review the PR comments (take a closer look at the reduce vs forEach
  • browser

    • merge master to the fork
    • review PR comments
      • remove from json
      • move to jslib base class
      • fix Chrome compatibility
      • figure out datalist overlay when there’s one element only. Would need to replicate the change for the other clients
      • test if there’s fallback for the older browser versions
  • Xamarin and mobiles

    • TBD later once desktop is done
1 Like

Sorry for the late response. I will be more than happy if you could help bring this feature live. I had personal and work related stuff lately, so I abandoned work on this feature. A few days ago I come back to finish it, but unfortunately, I cannot run the js projects anymore due to some dependencies on Windows side. And I haven’t got time to investigate it properly. Today’s afternoon I will take a look on it, and try to run the project once again.

Okay, I managed to get to the code in the afternoon. To be honest, I no longer see possibility to integrate my previous work with the current state of the system in it’s core functionality in jslib part. Between the time that I’ve developed it and now there were major changes to project layout etc. and I find that it would be better to just write it once more in the jslib part at least.

Hi @levkach, just confirming that you’re welcome to take this feature on. I haven’t compared the code myself, but we have had some major rewrites in jslib lately, so I suspect that @michecinski is right that it’s better to restart this work with a fresh branch/PR. However, there’s nothing stopping you from copying from the old PR if appropriate.

I also encourage you to review the discussion on the existing PRs (which you may have already done) which might help you when writing your implementation.

@michecinski, I’ll close your old PRs for now based on your update above. Thanks for your efforts!

1 Like

Hi @levkach have you started working on this feature yet?

1 Like

This is the one feature that is missing for me, would love to see it implemented. Personally I’d set a default username that can be edited if needed, but if a more sophisticated solution is being looked at, great. I see the username generator already exists, but doesn’t allow for a default.

4 Likes