How to use Google Authenticator with ACP 04-20-2015, 02:57 AM
#1
Follow up to this thread: http://alphas.sx/Thread-Google-Authentic...gin-to-ACP
[hide]
First download the plugin from here:
http://alphas.sx/Thread-Google-Authentic...gin-to-ACP
Auth2My use Google's 2-step verification (time based) to login admin panel. 2-step verification adds an extra layer of security to your admin accounts by requiring them to enter a verification code in addition to their username and password.
You need to edit core files for this mod. Here is guide how to edit and install.
1. Download plugin, unzip and upload files from "upload" folder to your forum root folder.
2. Go to your admin panel and install Auth2My -plugin. Then you can see Auth2my link in "Configuration" tab, go there and scan QR-image with your "Google Authenticator" app.
3. Open admin/inc/class_page.php and find these lines (around line 389):
PHP Code:
<div class="label"{$login_label_width}><label for="password">{$lang->password}</label></div>
<div class="field"><input type="password" name="password" id="password" class="text_input" /></div>
Add these below:
PHP Code:
<div class="label"{$login_label_width}><label for="auth2my">Auth2:</label></div>
<div class="field"><input type="password" name="auth2my" id="auth2my" class="text_input" /></div>
Open admin/index.php and find these lines (around line 129):
PHP Code:
if($user['uid'])
{
$query = $db->simple_select("users", "*", "uid='".$user['uid']."'");
$mybb->user = $db->fetch_array($query);
}
Add these below:
PHP Code:
require_once MYBB_ROOT."inc/3rdparty/auth2my_class.php";
$query = $db->simple_select("auth2my", "*", "id='1'");
$auth2my = $db->fetch_array($query);
$auth2my_verify = Google2FA::verify_key($auth2my['auth2my_key'], $mybb->input['auth2my']);
if ($auth2my_verify == false && $auth2my['auth2my_active'] == "yes") {
$default_page->show_login("Invalid Auth2","error");
}
4. Logout and test login to admin panel.
[/hide]
[hide]
First download the plugin from here:
http://alphas.sx/Thread-Google-Authentic...gin-to-ACP
Auth2My use Google's 2-step verification (time based) to login admin panel. 2-step verification adds an extra layer of security to your admin accounts by requiring them to enter a verification code in addition to their username and password.
You need to edit core files for this mod. Here is guide how to edit and install.
1. Download plugin, unzip and upload files from "upload" folder to your forum root folder.
2. Go to your admin panel and install Auth2My -plugin. Then you can see Auth2my link in "Configuration" tab, go there and scan QR-image with your "Google Authenticator" app.
3. Open admin/inc/class_page.php and find these lines (around line 389):
PHP Code:
<div class="label"{$login_label_width}><label for="password">{$lang->password}</label></div>
<div class="field"><input type="password" name="password" id="password" class="text_input" /></div>
Add these below:
PHP Code:
<div class="label"{$login_label_width}><label for="auth2my">Auth2:</label></div>
<div class="field"><input type="password" name="auth2my" id="auth2my" class="text_input" /></div>
Open admin/index.php and find these lines (around line 129):
PHP Code:
if($user['uid'])
{
$query = $db->simple_select("users", "*", "uid='".$user['uid']."'");
$mybb->user = $db->fetch_array($query);
}
Add these below:
PHP Code:
require_once MYBB_ROOT."inc/3rdparty/auth2my_class.php";
$query = $db->simple_select("auth2my", "*", "id='1'");
$auth2my = $db->fetch_array($query);
$auth2my_verify = Google2FA::verify_key($auth2my['auth2my_key'], $mybb->input['auth2my']);
if ($auth2my_verify == false && $auth2my['auth2my_active'] == "yes") {
$default_page->show_login("Invalid Auth2","error");
}
4. Logout and test login to admin panel.
[/hide]
Spoiler:
-.- FLAME WAR!

![[+]](https://sinister.li/images/modern/collapse_collapsed.png)