Hello all,
I firstly managed to configure google connect plugin. Facebook was still crashing at that time, the free facebook connect plugin from market.osclass.
Then I did some modifications on OSCFacebook.php and updated to the latest php sdk by running "php composer require facebook/graph-sdk"
Thus, I managed to get Facebook connect working just great. It even found my existing osclass account matching with the FB mail and it linked both FB and osclass acoounts into one. So far so good.
However, once I got facebook to work fine, suddenly google started crashing and crashing!
It first redirects to google page where user is being asked to enter gmail account credentials. Once the google credentials are entered, it throws:
"Facebook SDK returned an error: Cross-site request forgery validation failed. Required GET param "state" missing."
Sometimes, not always, I get the following google connect error in /var/log/apache/error.log:
PHP Fatal error:
Uncaught Google_AuthException: Error fetching OAuth2 access token,
message: 'invalid_grant' in /var/www/html/muzikalnik.com/oc-content/plugins/google_connect/src/auth/Google_OAuth2.php:113
Stack trace:
/var/www/html/muzikalnik.com/oc-content/plugins/google_connect/src/Google_Client.php(131):Google_OAuth2->authenticate(Array, 'AQBeE855xmTuMMn...')
/var/www/html/muzikalnik.com/oc-content/plugins/google_connect/connect.php(44): Google_Client->authenticate('AQBeE855xmTuMMn...')
/var/www/html/muzikalnik.com/oc-content/plugins/google_connect/functions.php(3): include('/var/www/html/m...')
/var/www/html/muzikalnik.com/oc-content/themes/veronika/header.php(90): gc_login_button()
/var/www/html/muzikalnik.com/oc-includes/osclass/helpers/hDefines.php(238): require('/var/www/html/m...')
/var/www/html/muzikalnik.com/oc-content/themes/veronika/main.php(8): osc_current_web_theme_path('header.php')
/var/www/html/muzikalnik.com/oc-includes/osclass/helpers/hDefines.php(238): require('/var/www/html/m...')
in /var/www/html/muzikalnik.com/oc-content/plugins/google_connect/src/auth/Google_OAuth2.php on line 113, referer: https://muzikalnik.com/user/register
It seems to me like both plugins are somehow sharing the same access token/id and thus one redirects to another.
And vice versa. While google connect was working fine, facebook connect was always redirecting to google.
In summary I don't seem to manage to get both plugins working together, but just one while the other is turned off.
Any ideas would be highly appreciated.
Thank you