A2FA (Another 2-Factor Auth)

Two-factor authentication method. Using Google Authentication mobile app
Price option: Free

Supports Moodle 2.7-3.7 See all versions
Latest release: 6 years ago
Installations: 109
Downloads (last 90 days): 21

Frankenstyle name: auth_a2fa
Authentication

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

I tested it on 3.1.
Was locked out as an administrator. Had to uninstall it and rerun installation (delete plugin and config.php) in order to get back on the track.
It appears after two years that the plugin is not maintained anymore.
It's a pity. This is heading towards what we need for teachers and administrators.
So Sam: do get back on the track. You did a nice first step!.
Does this plug-in work for Moodle 2.9?
Does this plug-in work with Moodle 2.8 as well?
You are cleared to land now, welcome to the Plugins directory!
Hi Sam,
That looks good. I had a look at the code in general +1 from me to accept your contribution into plugins.
Thank you for your work,
Tomek
Hi Tomek and David,
I have made the required changes as follow:
1. Added a note in the readme about the custom login URL.
2. Added a section in readme explaining how to set up the user's A2FA before enabling the auth method to allow the user to set up their Google Auth.
3. I was missing the setType call for 2 fields in afaqr field class file. I have updated that as well.
4. This a valid point, I have modified the DB query to check for records with 'our' fieldid.
I also added the dependency to the version file, I am uploading the updated version right now.
Thanks for your time and help.
Sam
Thanks Sam for providing the profile field plugin. That one looks ok and will be approved together with this one in one step. I am still missing the dependency declaration in version.php. Can you please add a new plugin version that contains it? Thanks to Tomek's peer-review, I'll be happy to approve both plugins once the dependency is explicitly declared and issues found by Tomek (at least the first three) are fixed. Thanks for you patience with the review and approval process.
Hi Sam,
The functionality works fine - I have just tested it.
Few notes:
1. Users will need to login at different URL: /auth/a2fa/login.php - I think you should mention that in readme.
2. What's your process for adding new users? How would tey set up/get their secret from their profile, before they have access to their account...? Maybe it's worth documenting.
3. I get this warning (with full debug on) after enabling your plugins, I'm not sure why:
Did you remember to call setType() for 'a2fa_baseurl'? Defaulting to PARAM_RAW cleaning.
line 1312 of /lib/formslib.php: call to debugging()
line 284 of /lib/formslib.php: call to moodleform->detectMissingSetType()
line 202 of /lib/formslib.php: call to moodleform->_process_submission()
line 157 of /user/editadvanced.php: call to moodleform->moodleform()
4. I'm a bit concerned about the possible performance impact of this in generate.php:
$row = $DB->get_records_select('user_info_data', $DB->sql_compare_text('data')." = '$secret'");
as user_info_data may contain a lot of records on busy sites. Maybe it's a good idea to limit the search to "our" fieldid only, instead of looking through all custom fields?
Tomek
I have submitted the required plugin, and it is now "waiting for approval"
Thanks
No, there is no reason. You are absolutely correct, I'll submit it for approval and modify version file
Is there any reason why the profilefield_afaqr is not submitted for approval into this Plugin directory as well then? Putting requirements like this into the README only is usually not enough. Admins who install plugins via the admin web interface may not read it. Moodle provides a way how a dependency on another plugin should be declared - please see the section about $plugin->dependencies at https://docs.moodle.org/dev/version.php
Sorry, here is the link:
https://github.com/hbattat/afaqr
Hi Sam,
You mention in readme that "This plugin requires another small plugin (profile field plugin) get it from here [link to afaqr]". Is this really the case? Can you provide me the link to afaqr if so?
Thanks for your submission!
Tomek