[FreddysHouse] Two-factor Authentication

[FreddysHouse] Two-factor Authentication 1.3.3

No permission to download
On XF 1.2, when enabled this addon (1.3.0), it will cause the whole site to show error nginx 500 Internal server error.
 
On XF 1.2, when enabled this addon (1.3.0), it will cause the whole site to show error nginx 500 Internal server error.

Just installing the zip on a fresh XF installation now, I guess I could have missed a file from the zip? Do you have anything in your server logs?
 
Just installing the zip on a fresh XF installation now, I guess I could have missed a file from the zip? Do you have anything in your server logs?
Hope this help.

2013/08/04 13:34:56 [error] 26629#0: *83450 FastCGI sent in stderr: "PHP message: PHP Fatal error: Cannot redeclare class XFCP_FreddysHouse_TwoFactor_Model_User in /home/nginx/domains/public/library/XenForo/Application.php(482) : eval()'d code on line 1" while reading response header from upstream, client: 157.55.32.149, server: www.domain.com, request: "GET /threads/master-reading-list-for-quants-mfe-financial-engineering-students.535/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.domain.com"
 
I'm trying to get this to work with 1.2.1.

The installation went fine, no errors, and I installed an authentication method. I enabled it under Home-Options-Two Factor Authentication, and I set the options for my authentication method as well. And I see the Two Factor tab under each user in the Admin Panel and that the option is enabled for each.

However there doesn't seem to be any option to add a key under the User Settings. In fact, the Two-Factor option doesn't show up under User Settings at all.

Am I missing something simple?
 
I'm trying to get this to work with 1.2.1.

The installation went fine, no errors, and I installed an authentication method. I enabled it under Home-Options-Two Factor Authentication, and I set the options for my authentication method as well. And I see the Two Factor tab under each user in the Admin Panel and that the option is enabled for each.

However there doesn't seem to be any option to add a key under the User Settings. In fact, the Two-Factor option doesn't show up under User Settings at all.

Am I missing something simple?

Check your usergroup permissions, you need to give your user's the permission to use it (the option under "edit user" is a user's way of turning it off themselves without deleting their keys [if they have permission to use it])
 
That was what I missed. I could have sworn that I checked the permissions but I must have overlooked it.

This mod works beautifully. Thank you.
 
Hello,

I got problem with "Lost your two-factor device". It doesn't sent reset email. These is what I have:
  • XenForo 1.2
  • Using Amazon email account for sending
I tried test on my local, this line doesn't works and return empty:
Code:
$usernameOrEmail = $this->_input->filterSingle('username_email', XenForo_Input::STRING);

Also for this, return another user different current login user:
Code:
$user = $this->_getUserModel()->getUserByNameOrEmail($usernameOrEmail);

Could you please help me.
Thank you
 
What happens when a users phone dies? How will they be able to access the website again?
This looks like awesome functionality to offer to my members but I do not want to loose members over it.
 
What happens when a users phone dies? How will they be able to access the website again?
This looks like awesome functionality to offer to my members but I do not want to loose members over it.

It includes an "I've lost my 2-factor gadget" link during login which emails them a link, clicking the link turns off two-factor authentication for their account. Then they can add a new key (e.g. on a new phone) and turn it back on again
 
like this add one but u get this error when trying to reset/lost the device, key function:

5wdnJ.png


this is on xenforo v 1.2.3 i need this to be fixed b4 i can let other members use this otherwise there will be issues with this and i cannot find any server error logs for this
 
like this add one but u get this error when trying to reset/lost the device, key function:

5wdnJ.png


this is on xenforo v 1.2.3 i need this to be fixed b4 i can let other members use this otherwise there will be issues with this and i cannot find any server error logs for this
Confirmed!
 
This is what I see in the error log using Chrome developer

View attachment 62083
same:

5wdLY

5wdKN


also since i have many dark themes the code cannot be scanned in even if i change background colors or the other one, i try white black, silver and black, white and silver, gray and silver and it only works on my themes with silver/gray back ground by default with transparent back ground and black outline or my space theme that is all transparent with bright background. but modifying colors in styling for the code does help or work at all and i using iphone 5s.

i really want this add one but not using till at least the reset function works properly if you loose ur device
 
I think it's related to the below:
Hello,

I got problem with "Lost your two-factor device". It doesn't sent reset email. These is what I have:
  • XenForo 1.2
  • Using Amazon email account for sending
I tried test on my local, this line doesn't works and return empty:
Code:
$usernameOrEmail = $this->_input->filterSingle('username_email', XenForo_Input::STRING);

Also for this, return another user different current login user:
Code:
$user = $this->_getUserModel()->getUserByNameOrEmail($usernameOrEmail);

Could you please help me.
Thank you

This is the code, which is returning a 404

PHP:
//$this->_assertPostOnly();

        $usernameOrEmail = $this->_input->filterSingle('username_email', XenForo_Input::STRING);
        $user = $this->_getUserModel()->getUserByNameOrEmail($usernameOrEmail);
        if (!$user)
        {
            return $this->responseError(new XenForo_Phrase('requested_member_not_found'), 404);
        }
which is copied straight from XenForo/ControllerPublic/LostPassword.php

I don't think that information is available in the current page, as if you view the source, you can see the values stored in the form

upload_2013-11-29_0-30-48.webp
 
so is this related to the add one or something else? i have no add ones installed in related with sending emails to users i only have the email mailing system set up using the default settings just using a custom email
5whjh.png
 
OK, so I've been able to get this working now.

You need to edit the template:

login_enter_twofactor

Change:

Rich (BB code):
        <dl class="ctrlUnit submitUnit">
            <dt></dt>
            <dd>
                <input type="submit" class="button primary" value="{xen:phrase log_in}" />
                <a href="{xen:link lost-twofactor/lost, '', 'username_email={$login}'}" class="OverlayTrigger OverlayCloser">{xen:phrase lost_twofactor_device}</a>
            </dd>
        </dl>

to

Rich (BB code):
        <dl class="ctrlUnit submitUnit">
            <dt></dt>
            <dd>
                <input type="submit" class="button primary" value="{xen:phrase log_in}" />
                <a href="{xen:link lost-twofactor/lost, '', 'username_email={$passThru.login}'}" class="OverlayTrigger OverlayCloser">{xen:phrase lost_twofactor_device}</a>
            </dd>
        </dl>

This then passed the login username to the URL to generate the e-mail.
 
Last edited:
Top Bottom