Browser: TOTP not copied to clipboard

Created on 17 Aug 2017  路  28Comments  路  Source: bitwarden/browser

When logging on to a site with a configured TOTP key (example: github, to post this issue), the TOTP is not copied to the clipboard when the login information is filled.

I filled the login information both by clicking the site via main addon icon, as well as selecting the site via right-click context menu.

I have not tested via keyboard shortcut, as I am also affected by #179, preventing use of that feature.

Most helpful comment

@andschwa Yes, this is intentional since autofill on page load may autofill something on a page when you are not actually going to log in. This could potentially wipe your clipboard when you did not intend it to. For this reason, TOTP copying is only done when explicitly autofilling from the UI.

All 28 comments

This is currently a bug only in Firefox. A fix is already in place for the next version, however. More context here: https://github.com/bitwarden/web/issues/84

I'll leave this open for verification after next version goes out.

Looks like the fix did not work. Will have to investigate more to see if this is possible.

OK so I have just tested with a clean installation of Firefox (55.0.3) and Firefox beta (56.0.x).
It did work with Beta only so I guess we (FF stable users) just have to wait :)
Tested on Github.com.

I was able to find a workaround for this in Firefox, however, Firefox's requirements will only allow it to work if autofilling from the "Current Tab" page in the bitwarden popup window. Autofilling from any other method (i.e. hotkey or context menu) will not permit access to the clipboard.

This fix will go out next release.

For the records, dom.allow_cut_copy must be set to true in about:config (Firefox).
Discussed with Osine as you know.

That setting is not required when autofilling from the popup window.

Yes but it prevents bitwarden from working properly if set to false.

Correct. This is required for autofilling from other areas. I guess this is some new flag? I was not aware of it before.

@Primokorn I can't find that flag in 57

@kspearrin actually it's a hidden pref so you can't see it by default.

@kspearrin Still can't get it to work (bitwarden 1.19.1 on Firefox 57.0b8 (64-bit)). Auto-filling or not, it just doesn't work.

Not sure what to do about the hidden pref but I think since the feature doesn't work correctly, this here issue should be re-opened.

@carlo Are you using autofill from selecting the login in the popup window or via hotkey? Currently it only works from the popup window in Firefox.

It also does not work if it's auto-filled on page load (instead of manually triggered).

Edit: In Firefox 58.

@andschwa Yes, this is intentional since autofill on page load may autofill something on a page when you are not actually going to log in. This could potentially wipe your clipboard when you did not intend it to. For this reason, TOTP copying is only done when explicitly autofilling from the UI.

Ah, that makes sense, thanks for the explanation.

I think it would be advantageous for Bitwarden to streamline the auto-fill process for sites which always require a TOTP code, as I described in #492. If we can get TOTP auto-filling figured out, then we wouldn't need to auto-copy the TOTP code any more, eliminating the problems described in this issue.

This features still doesn't work for me on Firefox 59-60 when using the hotkeys to autofill the form.
And as the TOTP code requires one more click than usual to obtain from the add-on, it becomes really annoying.

Is this issue something that can be worked-around on the add-on (besides using the popup window) or Firefox just won't let it happen?

Firefox won't let it happen. Can only use clipboard from popup window.

Could we then add a button to copy TOTP from the list?

@Crocmagnon Please vote for that exact feature request: https://community.bitwarden.com/t/quick-copy-totp-code/38 馃槃

Already voted 馃槈 but thanks

I cannot get TOTP to automatically copy in either Firefox (v66) or Chrome (v74) with the latest version of Bitwarden extension (v1.39.3). I have tried filling in the login form via hotkeys and also by using the browser extension button.

@dpantel do you have a premium membership?

@kspearrin I have a family organization

Does the item belong to the family organization or your personal vault?

It belongs to the org.

I can manually get the code by drilling down into the BW extension menu. It also auto-copies to clipboard just fine in the iOS app.

@dpantel Should be fixed in next version with 92fb43fc2e92609c7b8264e2c4d3f4137ce66013 . Thanks.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

subdavis picture subdavis  路  23Comments

kspearrin picture kspearrin  路  62Comments

minmarble picture minmarble  路  16Comments

dralley picture dralley  路  79Comments

WardsParadox picture WardsParadox  路  139Comments