Facebook login doesn't work completely with form embedded on a Joomla module

Hi all,

Your software
My Mautic version is: 3.3.3
My PHP version is: 7.4.21
My Joomla! version is : 3.8.27 (same PHP version)
My Mautic-Joomla plugin version is : 1.2
My Database type and version is: Apache libmysql - mysqlnd 7.4.21
Test with Chrome Version 92.0.4515.107 (Build officiel) (64 bits) and Firefox Version 90.0.2 (64 bits)

Your problem

I’m using a Mautic form with a Facebook login button embedded on a Joomla module. I set up the Mautic-Joomla plugin, Mautic-Facebook plugin and a Facebook app with Facebook login product. Everything works pretty well. Almost of all, except for prefilling the form field into the Joomla module. It’s work with the form preview and with a form embedded on a Mautic landing page, but not with Joomla. My Joomla website is located on a main domain (‘mydomain.com’) and Mautic, on a subdomain ‘mautic.mydomain.com’. I’ve enabled CORS and white-listed ‘https://www.mydomain.com’, ‘https://mydomain.com’ tried mydomain.com etc (*) in Mautic configuration. I’ve configured the same domains with the Facebook app settings.

When I try to log in with the Facebook Login button from the form embedded on the Joomla module, the contact is pull in to Mautic well but the window is blocked and I can’t close it with the button “Close window” and thus the function onclick=“postFormHandler” doesn’t work also.

It’s blocked because : « Uncaught DOMException: Blocked a frame with origin “https://mautic.mydomain.com” from accessing a cross-origin frame. at postFormHandler (https://mautic.mydomain.com/plugins/integrations/authstatus/Facebook:101:33 ».

No error is recorded in Mautic log.

I’ve tried several things, like to change settings in facebook, mautic and joomla configuration, recreate forms, add the following rule in my website .htaccess file: Header set Access-Control-Allow-Origin: * , allow Access-Control origin to browers (Chrome, Firefox), tested in a incognito browser or even embed the Mautic form into a Joomla article…

Does anyone have the same problem? Any ideas?