Reviewed & tested by the community
Project:
TFA Basic plugins
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2016 at 11:42 UTC
Updated:
10 Jun 2023 at 07:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
realityloop commentedPatch attached
Comment #3
realityloop commentedprevious patch missing some things, updated patch attached
Comment #5
helmo commentedThanks, this works.
The testbot results look unrelated to this patch.
This will make it easier to add tfa to Aegir ... #2734589: Bundle two factor authentication - tfa
Comment #6
realityloop commentedremoved extraneous library load
Comment #8
helmo commentedI think we can also drop the
line... updated patch.
Comment #10
helmo commentedre test? The failure seems unrelated to this patch.
Comment #11
helmo commentedComment #13
helmo commentedComment #14
helmo commentedComment #15
helmo commentedComment #17
helmo commentedIt must be the dependency on the libraries module that's breaking the tests. I've updated the testcase to also enable the libraries module.
Comment #19
helmo commentedI ran simpletest again on the patch from #17 ... All green.
The only thing I can think of is that the testbot does not fetch the new dependency.
Comment #20
helmo commentedIt's now added to the Aegir makefile with this patch.
Comment #21
coltraneI think libraries module should be optional so use module_exists('libraries') and don't make an explicit dependency on the module. Otherwise this is cool and thank you for working on it!
Comment #22
nullkernel commentedI've attached an updated patch and an interdiff. Notable changes are:
I had made much of the patch before finding this issue. When I was writing the version number in hook_libraries_info(), I could find no version number for QRCode.js. So I used the project's last commit date as the version number.
In the readme, I made this new way "Option 1", because I don't like the idea of manually adding the library to a subfolder of the tfa_basic module. Users who update this module may lose the library (e.g. using drush pm-update) and not realize that the module has fallen back to sending private keys to Google. It may be worth adding a hook_update_N() or some other means to advise the administrator that there is now a way to permanently add qrcode.js. This kind of goes along with https://www.drupal.org/project/tfa_basic/issues/2809151. Thoughts?
Comment #23
damienmckenna#22 seems to be working, thank you.
Comment #24
tapash commentedI cant seem to get it working. After applying the #22 patch getting JS error in console
ReferenceError: Can't find variable: QRCode. The QR code doesnt show on 2FA setup screen. I have tried placing the qrcode JS both in libreries and includes folder.