MFA

5 views
Skip to first unread message

Bas van den Dikkenberg

unread,
Sep 6, 2022, 6:52:33 AM9/6/22
to Joomla! General Development
Hi all,


We have Custom auth plugin with 2fa, now with mfa i am redesign the 2fa plugin.

My issue we have the same Credentials include MFA in an external source. 
Thats not my problem is. 

My problem is dat joomla requires to be a valid ###AES128### hash in de option field in #__user_mfa  . 

How can i make valid empty hash for user? 
So the MFA is activate when user log's in ?

With kind regards,


Bas van den Dikkenberg
HCC

Bas van den Dikkenberg

unread,
Sep 6, 2022, 7:10:16 AM9/6/22
to Joomla! General Development
Found my own answer :

use Joomla\Component\Users\Administrator\Service\Encrypt;
$encryptService = new Encrypt();
$encrypted = $encryptService->encrypt(json_encode(array('key'=>'foobar')));
echo 'Encrypted <br>';
echo $encrypted;
$decrypt = $encryptService->decrypt($encrypted);
echo '<br>Decrypted <br>';
echo $decrypt;
Op dinsdag 6 september 2022 om 12:52:33 UTC+2 schreef Bas van den Dikkenberg:
Reply all
Reply to author
Forward
0 new messages