# Summary

This module will allow you to add Time-based One-time Password Algorithm (also called "Two Step Authentication" or "Multi-Factor Authentication") support to user logins. It works with Google's Authenticator app system and support most (if not all) OATH based HOTP/TOTP systems.

# Project URL

https://www.drupal.org/project/ga_login

# Where is the code?

None

# Estimated completion date

(If known, when is this module targeted for completion?)

# Dependencies

None

# Who's doing the port?

None

# What help do they need?

(Are there specific types of resources (e.g. skillsets, $, sprints) that would be helpful to expedite porting?)

# D8 roadmap

None

# Background and reference information

None

Comments

Devaraj johnson created an issue. See original summary.

devaraj johnson’s picture

Antikpred’s picture

please make for Drupal core 8.xx

vg3095’s picture

I am interested in this project under GSOC.
I was trying to figure out , what is all required to port this module.
I came to the following observations.
The porting of this module has following parts-

1)Drupal 8 configuration management system-Old-style Drupal Variables (formerly
controlled with variable_set and variable_get) need to be converted to Drupal
8's new configuration system API/storage. I have to re-write these type of
calls which to ensure that they use the correct configuration object.
Also, I have to decouple hook_menu() implemention to Drupal 8 style.

2)Methods like user_access() ,user_load(),user_login(),etc are to be replaced .
In drupal 8,there is a 'current_user' service, which can be injected into
classes to provide access to the current user account . In code , we can
access this service and retrieve the current user account object by calling
\Drupal::currentUser(). Once you have a user object for the current user
(implementing \Drupal\user\UserInterface), we can call inherited method
\Drupal\Core\Session\AccountInterface::hasPermission() to check permissions,
or pass this object into other functions/methods.

User objects in Drupal are entity items, implementing
\Drupal\user\UserInterface.

3)Drupal 8 form builder service- All functions such as
form_set_error(),form_get_errors(), are to be replaced by form builder
service.

4)Drupal 8 caching - Replace drupal 7 reset cache code with
EntityStorageInterface class methods.

5)Convert url() links according to routing based URL generation API-

6)Fix Tests- Since drupal 8 depends on form builder service, tests based on
drupal 7 forms api has to be changed according to drupal 8 form api , because
the form test calls cannot extract the values because it is either
indeterminate, or not scalar.

dbjpanda’s picture

@yuha : Already Started Porting Ga_Login to D8 as my GSOC Project.

nerdstein’s picture

@dbjpanda - where is the repository for this port? We want to help test and contribute to stabilize. Is this in Github or something?

dbjpanda’s picture

@nerdstein Please Check your mail.

nerdstein’s picture

I received the invite, thanks! Is there a reason you wouldn't want to make the repo public for others to contribute to?

nerdstein’s picture

After talking with attiks, we believe a port with a dependency of the TFA module is appropriate.

The TFA module (which is close to having an alpha release) is being developed here: https://github.com/d8-contrib-modules/tfa

TFA provides all of the scaffolding for the two factor operations. And, it provides plugin systems for the various operations. Contributed modules can extend TFA by leveraging it's various plugin systems.

I strongly recommend we come up with a new plan that discusses the use of the plugin systems and TFA as a dependency. I will help support TFA as needed.

dbjpanda’s picture

Assigned: Unassigned » dbjpanda
geerlingguy’s picture

@nerdstein - What's the status on the tfa port? It would be awesome to have a release on Drupal.org at some point, because over in #2307785: Port TFA to Drupal 8, the comment history shows like 5 or 6 different ports at different points in time. Is the one under d8-contrib-modules the one that will eventually pull back into Drupal.org for a release?

nerdstein’s picture

Assigned: dbjpanda » nerdstein

We are quite close to releasing alpha on all of this.

TFA: https://github.com/d8-contrib-modules/tfa

We are working on this as part of GSoC and in parallel with GA_Login. We discussed this with Ben Jeavons (coltrane) at DrupalCon. Its in final code review (before an alpha).

GA_Login: https://github.com/d8-contrib-modules/ga_login

This is very close and we're in final code review (before alpha). It's already been tested on a few projects (which subsequently means we have tested TFA as well).

*new module* Twilio: https://github.com/d8-contrib-modules/tfa_twilio

This was teased out of TFA to keep it as more of an API. Work begins on it this week because we have a pretty stable build of TFA/GA_Login.

nerdstein’s picture

Status: Active » Needs review

The initial code from GSoC has been pushed to the 8.x-1.x branch, dev release created. Marking this as needs review

naveenvalecha’s picture

Status: Needs review » Needs work

Setting it to N/W as project does not have any alpha/beta available for testing as per https://www.drupal.org/project/contrib_tracker#statuses

bgronek’s picture

Hi there! It looks like this module is very close to being ready for alpha. Is there any support needed at this time to help this along?

aaronbauman’s picture

Status: Needs work » Needs review

There's an alpha now, so moving to needs review.

Can a maintainer comment on any outstanding issues that I should consider when evaluating this module for production use?

avpaderno’s picture

Assigned: nerdstein » Unassigned
Status: Needs review » Closed (outdated)
Issue tags: -porting, -needs Drupal 8 port, -D8 porting

The Drupal 8+ branch has been marked unsupported.