When configuring Google 2FA for Magento Admin page per magento Google 2fa guide, the barcode used to setup the Authenticator shows as a broken image icon instead.
There is a suggested code fix by 'Lokesh Vinay Kumar' (Jan 28, 2022 at 7:28) on stackexchange but the path used in the fix is a bit different for my example:
In '<magento dir>/vendor/magento/module-two-factor-auth/Block/Provider/Google/Configure.php'
Change:
$this->jsLayout['components']['msp-twofactorauth-configure']['qrCodeUrl'] = $this->getUrl('*/*/qr');
To:
$this->jsLayout['components']['msp-twofactorauth-configure']['qrCodeUrl'] = $this->google->getQrCodeAsPng($this->session->getUser());
AND
In '<magento dir>/vendor/magento/module-two-factor-auth/Model/Provider/Google.php'
Change:
return $pngData;
To:
return $qrCode->writeDataUri();
Trying to figure out if it's a server configuration issue or a code bug.
Any suggestions would be appreciated.
Vegan Options Chipotle – Guys!! Are you looking for the best Chipotle vegan options? We can help you find the best vegan options at Chipotle. Can you make the rice vegan?
Hello @shannonvan857d
Please check out Magento 2 Factor Authentication (2FA) extension from miniOrange. This extension has Google Authenticator including many more features and adds an extra layer of security to your Magento store by requiring two-factor authentication for admin and customer accounts.
Features provided in the extension:-
15+ Authentication Methods ( Google Authenticator, Microsoft Authenticator, Duo Authenticator, OTP over WhatsApp, etc.)
Enforce 2FA registration of User
Enable if your users want to change the 2FA method
Allow specific 2FA methods to configure in inline registration
Role Based 2FA
Backup Codes
Blacklist and whitelist IPs etc.
Please check out this link to know more about the Magento 2FA extension by miniOrange
We at miniOrange provide state-of-the-art plugins for Magento with custom modifications to cater to your every need. Please reach out to us at magentosupport@xecurify.com to discuss your requirement in detail and then provide you with this solution accordingly.