Activate 2FA authentication on backend
save
Disconnect
Try to log in (on backend or frontend)using a password manager (i.e. 1Password or Lastpass)
The password manager recognize and fill the 3 fields
Password manager only recognize "User" and "Password" fields - It does not recognize "secret key" field.
Joomla 3.9.14
PHP 7
1password 7.3.2
I had a discussion with 1Password team to solve this issue on their side, but i had an answer saying it is on Joomla dev side to fix this. It seems that the HTML name "secretkey" is not an industry standard. See topic here for those who are interested : https://discussions.agilebits.com/discussion/comment/541779.
Proposition from 1Password team : "Simply changing the HTML name to "OTP" or "two_factor".
I have not yet tested with Lastpass i.e.
Labels |
Added:
?
|
Labels |
Added:
?
|
The field type should be a plain text input. No service that I have ever used uses a masked password field for its 2FA input, there really isn’t much of a reason to do so.
One of my credit card companys uses a masked 2fa field (and it sucks)
my 2 cent
I assume it was for the yubikey stuff which also uses that field and isn't using OTP. But happy to be told that I'm wrong there
The field type should be a plain text input. No service that I have ever used uses a masked password field for its 2FA input, there really isn’t much of a reason to do so.
I see, my mistake. Sure it should not be masked.
All Internet services where I have activated 2Fa, has "Text" as type. i.e. Akeeba or Siteground - Name there are "two_factor_code" for Siteground and "code" for Akeeba. 1Password handle that fields without a problem...
KeepassXC Browser supports the following field names:
'2fa',
'auth',
'challenge',
'code',
'mfa',
'otp',
'token'
As far as I understand the code in that file, is also works if it is only a part of the name, i.e. "two_factor_code" should work, too, because it contains "code":
You seems to be right @richard67 , as for 1Password the field name "code" works for Akeeba i.e.
BTW, I have asked for 1Password name field list it recognize, just to give an idea (https://discussions.agilebits.com/discussion/comment/541779). I will come back here with it, if they give me anythings.
Feedback from Agilebits-1Password support :
There are honestly too many to list, but the biggest ones are: otp and totp. They can also include something like: 2fa, code, two-factor, challenge, token, mfa, and I'm sure 1Password will be able to figure it out. I'm so glad you reached out to them!
Lets do it then. Sounds like a j4 thing to avoid breaking any custom 2fa plugins (even in core we're somewhat using it
)When I first saw this on the forum I was really surprised as I havent seen anything anywhere about an industry standard. I just came across this article, whilst looking for something else, from twilio the makers of authy and they make no mention of this at all.
HTML attributes to improve your users' two factor authentication experience
Hi Brian, OK seen. I let there a comment just to see if they have any advice about that... I will make a feedback here.
What we can do in 3.9 is to add the autocomplete="one-time-code" attribute (it's not supported by keepassxc but there is a PR keepassxreboot/keepassxc-browser#723 for this).
Maybe that's the better way then renaming our token at least for 3.x
What we can do in 3.9 is to add the autocomplete="one-time-code" attribute (it's not supported by keepassxc but there is a PR keepassxreboot/keepassxc-browser#723 for this).
Maybe that's the better way then renaming our token at least for 3.x
Sounds reasonable to me.
So or so, there is definitely no industry standard for that, so the title of this issue is misleading, even with the question mark.
You're probably right @richard67 , it seems that there's probably no "Industry standard". I asked Agilebits for their sources about that, but it looks like the terms has been used for "what was generally seen when testing websites on a daily basis".
I had also a look at this article Agilebits suggested : "The HTML autocomplete attribute" from Mozilla where maybe some foundation has been done for this question?
The Name or ID there suggested is "one-time-code"...
the autocomplete="one-time-code"
seems to be a standard at least on the papers like :
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofilling-form-controls:-the-autocomplete-attribute:attr-fe-autocomplete-one-time-code
Is someone willing to add that as a PR? Apple also supports one-time-code so seems very logical https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element
I'm on! Feedback soon...
My tes has been done only with 1Password. It seems that the autocomplete="one-time-code"
was not enough to make 1Password recognize the field. I have added id="one-time-code"
and then 1password has recognize the field, filled it and i could login.
and id="mod-login-onetimecode"
?
(of course with autocomplete="one-time-code"
, i.e. only id changed so it fits to our conventions).
Yep @richard67 - It works well with id="mod-login-one-time-code"
autocomplete="one-time-code"
...
As I said above, at least with 1Password.
Yes! Just seen it :) Works too !
<input id="mod-login-onetimecode" name="secretkey" autocomplete="one-time-code" tabindex="3" id="mod-login-secretkey" type="text" class="input-medium" placeholder="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>" size="15"/>
hmm now it has 2 ids, that cannot be.
please be patient i'll try to find some free time to work on it, but not sure it will happen before the weekend, anyway my pr is open to everyone that want to help and it is more faster than me ....
Ooops, sorry... Too quick!
Work too with :
<input id="mod-login-onetimecode" name="secretkey" autocomplete="one-time-code" tabindex="3" type="text" class="input-medium" placeholder="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>" size="15"/>
<input name="onetimecode" autocomplete="one-time-code" tabindex="3" id="mod-login-onetimecode" type="text" class="input-medium" placeholder="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>" size="15"/>
would be perfect, i.e. change name, too.
We should give nicola time, if necessary i can help, too. Then i think it will be fixed soon. Stay tuned.
OK no problemo. @richard67 your last code did not work for me : error on login.
I tried again with :
<input id="mod-login-onetimecode" name="secretkey" autocomplete="one-time-code" tabindex="3" type="text" class="input-medium" placeholder="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>" size="15"/>
and met no issu.
This is just for info, no one has to speed with that. I don't want to do any mess in the PR as I have never work with this tool before (kind of newbie :).
@paoprod Well I just see in the discussion at 1Password you have linked above that they aren't checking the autocomplete
property, they check id
and name
.
But as far as I understood @wilsonge above we should add only the autocomplete
to Joomla 4. Or did I understand that wrong and we also can change the id
?
Maybe 1Password should implement a check of the autocomplete
property to go with the possible future standard?
@paoprod Yes, I saw that discussion. Sure you can quote me, but I am nobody important, just a normal volunteer contributor.
So maybe it is more effective when you quote
(links taken from discussion above in this issue here).
You're right :) Done!
OK feedback : Here is the answer I get:
I don't think I'm following your suggestion. 1Password X does take autocomplete into account when determining what fields should/shouldn't be filled. It's not the only thing 1Password looks at simply because the autocomplete attribute isn't always used the way it should be. It's something we mention on our page that explains how to design a website to work best with 1Password.
But as far as I understood @wilsonge above we should add only the autocomplete to Joomla 4. Or did I understand that wrong and we also can change the id?
No you can change the autocomplete to Joomla 3. I'd be careful changing id's in Joomla 3 - because people often use them to do special styling (although I'd see it as a relative edge case tbh for that field).
how to design a website to work best with 1Password.
It's interesting that page suggests to use autocomplete as 1 of their 4 things to improve reliability :D Ref:
Use autocomplete attributes on fields. They’re not required, but there may be fields 1Password can’t locate without them.
1Password docs reads as if they check ID or name ... we seem to use the name and not the id for DOM queries and in PHP ... strange ... so it seems we could change the id but not the name ... but this should be tested carefully if done.
We use the name in PHP but in CSS people will use the ID if they add any special styling
Screenshot give this:
With your last modification #27967 the filling is not completed:
With the ID modification seen yesterday above:
<input id="mod-login-onetimecode" name="secretkey" autocomplete="one-time-code" tabindex="3" type="text" class="input-medium" placeholder="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>" size="15"/>
The filling is completed:
This screenshot has been done with Chrome plugin 1PasswordX but tests has been done with the Desktop application and the 1Password Chrom Plugin too (just for info).
although I'd see it as a relative edge case tbh for that field
@richard67 Maybe it mean it could be possible from version 4?
J4 for sure .. but let's see how discussion ends .. maybe it can be done for J3. I am not the one to decide, I only wanted things not to be forgotten.
Labels |
Removed:
?
|
Hi all... Sorry for that "newbie" question, but what stand the GSoC label for ?
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-03-20 15:25:26 |
Closed_By | ⇒ | joomla-cms-bot |
Closed_By | joomla-cms-bot | ⇒ | Quy |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/27580
Status | Closed | ⇒ | New |
Closed_Date | 2020-03-20 15:25:26 | ⇒ | |
Closed_By | Quy | ⇒ |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-04-07 13:22:45 |
Closed_By | ⇒ | HLeithner |
Status | Closed | ⇒ | New |
Closed_Date | 2020-04-07 13:22:45 | ⇒ | |
Closed_By | HLeithner | ⇒ |
Thank you for raising this issue.
Joomla 3 is now in security only mode with no further bug fixes or new features.
As this issue doesn't relate to Joomla 4 it will now been closed.
If we are mistaken and this does apply to Joomla 4 please open a new issue (and reference this one if you wish) with updated details for testing in Joomla 4.
cc @zero-24
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-08-28 05:04:08 |
Closed_By | ⇒ | alikon | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
Maybe in addition to changing name (or ID) it needs to change the field type from text to password?