For most sites, keys generated by Google Authenticator refresh automatically once per minute. However, the key generated for this module must be manually refreshed each time. Can you explain why this is? I'm assuming the authentication mechanism used by ga_login is somewhat different from other sites, possibly counter-based instead of time-based?

CommentFileSizeAuthor
#5 ga_login-1906414-5.patch529 bytesdanepowell

Comments

attiks’s picture

This module supports time based and it works in the D7 version, but it's been a while that I tried the D6 version. Can you try the D7 version and report the os your using the app on?

danepowell’s picture

I only run this on one site, and it's D6, so I can't really test the D7 version. I'm using the Google Authenticator Android app.

Briefly looking through the ga_login code, it looks like the ga4php library supports TOTP but defaults to HOTP, and when ga_login creates a new user key, it doesn't specify TOTP or HOTP.

I'm not an expert but I think TOTP should be preferred because it's more secure and less hassle for the user, since he/she doesn't have to manually refresh the code. But maybe the user can at least be given the choice on the key creation form.

attiks’s picture

You can try changing line 82 in ga_login.module from $key = $ga->setUser($username); to $key = $ga->setUser($username, "TOTP");

danepowell’s picture

Title: Code not automatically refreshed in Google Authenticator » Add option (or default) to create TOTP-based key
Version: 6.x-1.1 » 6.x-1.x-dev
Category: support » feature

Great- I deleted my existing key and applied #3, and a TOTP-based URL was generated. Thanks!

I guess this is really a feature request then to add TOTP support.

danepowell’s picture

Status: Active » Needs work
StatusFileSize
new529 bytes

Here's a temporary workaround based on #3.

danepowell’s picture

Status: Needs work » Fixed

It looks like this was fixed with the following commit:
http://drupalcode.org/project/ga_login.git/commit/dd04ea3

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.