bartnv / twofactor_webauthn

Roundcube plugin for FIDO2/WebAuthn 2-factor authentication
GNU General Public License v3.0
30 stars 7 forks source link

Add human-readable names for keys #19

Closed paulschreiber closed 1 year ago

paulschreiber commented 1 year ago

Allow users to add (and edit) human-readable names for keys.

bartnv commented 1 year ago

Yeah, this is the same request as in #7. I still want to add this and I see it was 2 years ago when I wrote that in the other issue. I'm currently updating and cleaning up the code. I'll add the key names next.

bartnv commented 1 year ago

Ok, I've pushed an update which enables this feature to Github and Packagist. Would you be willing to give it a test?

paulschreiber commented 1 year ago

Was able to add a name when adding a key. Cannot edit existing names.

Suggest using a standard <input> instead of window.confirm(). Each to use and more accessible.

bartnv commented 1 year ago

Ok, I've just released version 1.2 which also adds an edit button for the name.

I agree an <input> would be better, but since Roundcube doesn't have a built-in way to request user input, it would be a hassle to add all that. I'm open to pull requests, but for me this is good enough.

gurnec commented 1 year ago

Would you be willing to give it a test?

@bartnv This works great for me, thanks!

One very minor suggestion: currently there's no easy way to identify which key is which when testing it. The Successfully checked key message displays the key's id, but after renaming a key, that id is no longer present in the Registered keys list. Perhaps the Successful message could also display the key's name, or in the Registered keys list, perhaps both the name and id could be shown?

In any case, thanks for adding this!