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

  1. Get the source code:
    git clone --branch 7.x-1.x logintc@git.drupal.org:sandbox/logintc/2193031.git logintc
  2. Open the directory: cd logintc
  3. Get the Git submodules: git submodule init && git submodule update to 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

  1. Enter your API key, domain ID
  2. 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

PA robot’s picture

Issue summary: View changes

We 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.

Rkumar’s picture

Issue summary: View changes
Status: Active » Needs work

1. In logintc.module, hook_user_login(),
$form = <<


LoginTC

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/
LoginTC’s picture

Issue summary: View changes
LoginTC’s picture

Hi Rkumar,

Thank you for reviewing our module.

  1. I read the Drupal coding standards and hook_user_login documentation. I removed the heredoc from logintc_user_login hook.
  2. I added more information to README.txt and a direct link to instructions on how to setup a LoginTC account: https://www.logintc.com/docs/connectors/drupal.html
  3. Please run git submodule init && git submodule update to pull in the logintc-php Git submodule. This submodule will be included in the packaged module .zip file.
  4. I fixed the HTML tags in the description.
  5. I reviewed the code and the only warning is a missing newline character at the end of the module file. However, there is a new line there. See results at http://pareview.sh/pareview/httpgitdrupalorgsandboxlogintc2193031git
LoginTC’s picture

Status: Needs work » Needs review
@purush’s picture

Status: Needs review » Needs work

Hi,

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 -

FILE: /var/www/drupal-7-pareview/pareview_temp/logintc.module
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
289 | ERROR | Files must end in a single new line character

Your .module file appears to be having two new line characters at the end. Remove the one line.

Thanks
Purushothaman C

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing 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.