We have developed a module (see https://drupal.org/sandbox/logintc/2193031) that adds an additional step to user authentication using LoginTC two-factor authentication. After successfully entering a username and password, the user's mobile device receives a LoginTC request (via push notifications) to approve/deny the authentication request. The request also includes useful information (e.g. IP address of the browser) to determine if it's a legitimate login request.
Installation
- Get the source code:
git clone --branch 7.x-1.x logintc@git.drupal.org:sandbox/logintc/2193031.git logintc - Open the directory:
cd logintc - Get the Git submodules:
git submodule init && git submodule updateto get the logintc-php library
Once installed, go to https://cloud.logintc.com/panel/register to create a free account to get an API key and to add a test user.
Configuration
- Enter your API key, domain ID
- Select which user roles must authenticate with LoginTC
Usage
Log in using a user's username and password. The LoginTC module traps the login attempt and displays a notice to approve the authentication request. When the user approves, the user authentication completes.
Comments
Comment #1
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
Rkumar commented1. In logintc.module, hook_user_login(),
You can not write code like this. Please read the coding standards of drupal. https://drupal.org/coding-standards https://api.drupal.org/api/drupal/modules!user!user.api.php/function/hook_user_login/7 2. Please write more instruction in Readme.txt. 3. File is missing require_once 'logintc-php/LoginTC.php'; giving error:- Fatal error: require_once() [function.require]: Failed opening required 'logintc-php/LoginTC.php' (include_path='.;E:\xampp\php\PEAR') in E:\xampp\htdocs\reorder\sites\all\modules\logintc\logintc.module on line 8 4. In your details HTML tags are coming. so write it properly. 5. Review your code here http://pareview.sh/pareview/$form = <<
LoginTC
Comment #3
LoginTC commentedComment #4
LoginTC commentedHi Rkumar,
Thank you for reviewing our module.
hook_user_logindocumentation. I removed the heredoc fromlogintc_user_loginhook.README.txtand a direct link to instructions on how to setup a LoginTC account: https://www.logintc.com/docs/connectors/drupal.htmlgit submodule init && git submodule updateto pull in thelogintc-phpGit submodule. This submodule will be included in the packaged module .zip file.Comment #5
LoginTC commentedComment #6
@purushHi,
Upon Manual Review,
1 - Running git submodule init && git submodule update to pull the logintc-php Git submodule. This is not allowed and you are violating the terms of Drupal.org. logintc-php appears to be 3rd party code. Generally, 3rd party code is not allowed on Drupal.org and should be deleted. It also appears in the terms and conditions you agreed to when you signed up for Git access, which you may want to re-read, to be sure you're not violating other terms. The Libraries API module is a recommended method for adding 3rd party dependencies without directly including the code on Drupal.org.
2 - Configuration form code written in the .module file but the Administer Configuration forms should be in the seperate .inc file for each of the forms.
3 - Inside
function logintc_user_login(&$edit, $account) {Don't use HTML Tags inside the .module file. Instead, use theme().
4 - When unistalling the module, variables are not deleted using variable_del()
5 - No documentation for installing the module. Add more detailed explanation for the installation of the module in the README.txt
6 -
Your .module file appears to be having two new line characters at the end. Remove the one line.
Thanks
Purushothaman C
Comment #7
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.