Two factor problems fixed after compose update
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once "{$_SERVER['DOCUMENT_ROOT']}'/api/classes/API_mfa.php";
|
||||
require_once "{$_SERVER['DOCUMENT_ROOT']}/api/classes/API_mfa.php";
|
||||
require_once "{$_SERVER['DOCUMENT_ROOT']}/../vendor/autoload.php";
|
||||
require_once "{$_SERVER['DOCUMENT_ROOT']}/login/php/authFunctions.php";
|
||||
|
||||
|
||||
use api\classes\API_mfa;
|
||||
use RobThree\Auth\TwoFactorAuth;
|
||||
use RobThree\Auth\Providers\Qr\EndroidQrCodeWithLogoProvider;
|
||||
use RobThree\Auth\Providers\Qr\EndroidQrCodeProvider;
|
||||
|
||||
$API_mfa = new API_mfa();
|
||||
|
||||
@@ -24,7 +24,7 @@ if ($API_mfa->request_method === 'POST') {
|
||||
$this->apiOutput(400, ['error' => 'secret not found.']);
|
||||
}
|
||||
|
||||
$tfa = new TwoFactorAuth(new EndroidQrCodeWithLogoProvider());
|
||||
$tfa = new TwoFactorAuth(new EndroidQrCodeProvider());
|
||||
|
||||
$API_mfa->postedData['user_uuid'] = $_SESSION['user']['user_uuid'];
|
||||
$API_mfa->postedData['user_two_factor_secret'] = $_SESSION['mfasetup']['secret'];
|
||||
|
||||
Reference in New Issue
Block a user