Has anybody got 2FA working?

Hi,
Has anyone got 2 Factor Authentication working in the latest version of SC.

I have followed the instruction videos and help files, but I just cannot even get a QR code to display. It is at this point that the screen freezes.

[secret] = $client->generateSecret();

in the function

sc_2fa_ga_generate_img();

which is called in the On_load event in security application app_add_2fa

Any help. SC have had this for a week now.

If the SC option does not work, has anyone got an external library to work?

Thanks
Tony York

What OAuth provider are you attempting to integrate with ?

Google Authenticator

Thanks
Tony

Hi
I use sonata library, but probably I will change during this year or in 2025, because the package is no longer maintained.
Required php 7.3 or 8

sc_include_lib(“sonata”);
sc_include_library(“prj”, “sonata/vendor”, “autoload.php”, true, true);
$g = new \Sonata\GoogleAuthenticator\GoogleAuthenticator();
$secret_code = $g->generateSecret();
$link = \Sonata\GoogleAuthenticator\GoogleQrUrl::generate($user, $secret_code, ‘xxxxxxxxxx’);

regards