Jump to content

Extension talk:TwoFactorAuthentication/Flow

About this board

99.112.244.238 (talkcontribs)

Using the following:
Product Version
MediaWiki 1.21.2
PHP 5.3+

Not working correctly. In addition to having to change...

require_once "$IP/extensions/TwoFactorAuthentication/TwoFactorAuthentication.php";

...to...

require_once( "$IP/extensions/TwoFactorAuthentication/TwoFactorAuth.php" );

(which could throw off some newbs)...the scripts do not appear to be working. When generating the code (via scan), authenticator say's invalid code. Additionally, when viewing special pages or testing code (when attempting to add manually) you receive a blank page. As released now, it doesn't appear that TwoFactorAuth is a working extension. Can you help?

This post was posted by 99.112.244.238, but signed as v1k0d3n.

Thingles (talkcontribs)

I installed it and after fixing the require as you noted and realizing you need to do a database update (I updated the extension page), it does display the QR code and I am able to successfully scan it. However, when I provide the code back to enable there is a PHP error which results in the page not rendering:

PHP message: PHP Notice:  Undefined property: SpecialTwoFactorAuth::$TwoFactorUser in .../TwoFactorAuthentication/SpecialTwoFactorAuth.php on line 168
PHP message: PHP Fatal error:  Call to a member function verifyToken() on a non-object in .../TwoFactorAuthentication/SpecialTwoFactorAuth.php on line 168

Would love to get this working, but so far no luck. WikiApiary does show some use of this extension, but only a couple of sites.

V1k0d3n (talkcontribs)

I'm still not able to successfully scan it. I keep getting the error; "Invalid Barcode" "The barcode 'otpauth://totp/[user]@[website / Wiki? secret=[secret]' is not a valid authentication token barcode. Did you run into this, by chance?

This sucks...I was able to get this to work on another site a while back...but I lost the data, as it was only for dev purposes. Figures that now that I want to use it for a site that actually requires more security...i can't get it to work! haha

Thingles (talkcontribs)

It turns out the fix to get this working is really simple. There is a minor typo that causes the fatal error. On line 168 of SpecialTwoFactorAuth.php the T needs to be lowercased.

$verify = $this->TwoFactorUser->verifyToken( $formData['token'] );

should be

$verify = $this->twoFactorUser->verifyToken( $formData['token'] );

After this change I was able to successfully make this extension work. I'd submit a patch, but gerrit freaks me out. Github pull requests are more my speed.

Thingles (talkcontribs)

Okay, I actually figured out how to submit the Gerrit change to fix this and I tagged the extension author to review it. Hopefully will be merged in shortly.

Parent5446 (talkcontribs)

Hey, thanks for the patch! That was a minor typo I must have missed when I changed the case of the variable. Merging it now.

V1k0d3n (talkcontribs)

I still don't see any of the changes reflected in the code. Am I missing something? (Tried for version 1.21 Wordpress).

V1k0d3n (talkcontribs)

you're awesome; good find(s)! i didn't have much time to look into it originally. glad i checked back to the discussion.

Reply to "Problems..."

Possible Update Request

2
216.119.237.66 (talkcontribs)

Hello, I haven't downloaded or used this plugin yet. This would be a great plugin for my work, but not all of our mediawiki members would want to use 2-factor authentication. Is this user preference based? If not, I would like to place a future request, if anyone wants something to work on with this, to have the extension preference based. Anyway, great plugin, I prefer 2fa myself and wish that more places would give the opportunity to use it!

Reply to "Possible Update Request"
Ryan lane (talkcontribs)

Why was it necessary to fork OATHAuth *and* to change the license to something incompatible?

Reply to "Why fork?"
There are no older topics