• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Google and Facebook login fail - callback

Started by rihardsg,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rihardsgTopic starter

Just installed PHPVibe and failing with Facebook and Google login
curl test is succesefull, error appears when return from auth provider
Any suggestions?:
Facebook:
Notice: Undefined variable: user_profile in \www\callback.php on line 51
Notice: Undefined index: id in \www\callback.php on line 59
Notice: Undefined index: name in \www\callback.php on line 60
Notice: Undefined index: username in \www\callback.php on line 61
Notice: Undefined index: email in \www\callback.php on line 62
Notice: Undefined index: email in \www\callback.php on line 65
Notice: Undefined index: bio in \www\callback.php on line 66
Notice: Undefined index: gender in \www\callback.php on line 67
Error. Please go back


Google:
Notice: Undefined property: stdClass::$emails in \www\callback.php on line 129
Warning: Invalid argument supplied for foreach() in \www\callback.php on line 129
Notice: Undefined property: stdClass::$placesLived in \www\callback.php on line 134
Warning: Invalid argument supplied for foreach() in \www\callback.php on line 134
Notice: Undefined property: stdClass::$id in \www\callback.php on line 140
Notice: Undefined property: stdClass::$displayName in \www\callback.php on line 141
Notice: Undefined variable: email in \www\callback.php on line 142
Notice: Undefined variable: country in \www\callback.php on line 143
Notice: Undefined property: stdClass::$image in \www\callback.php on line 144
Notice: Trying to get property of non-object in \www\callback.php on line 144
Error. Please go back
  •  

rihardsgTopic starter

Similar problem with Twiter login:
After returning to http://www.xxxx.com/callback.php?type=twitter&oauth_token=xxxxxxxxx screen is clear without any error messages
Seems that common problem is callback.php file.
  •  

PHPVibe A.

Hi,


did you configure the applications right?
It seems like it doesn't get any info from them, all is blank.
Twitter is deprecating due to not providing the e-mail anymore, but the others should work flawless.

Anything server side? In the logs?

rihardsgTopic starter

I switched on callback.php all error reporting in PHP, but on Twitter login there are no errors displayed or logged in files
If switch on var_dump($twitterObj); the whole set of returned Twiter data are displayed
callback.php seems not forwarding request further
  •  

PHPVibe A.

Dig a bit lower and let me know which verification fails.

if(isset($keys_values) && is_array($keys_values)) {


if(!$id || nullval($id)) {

} elseif(intval($id) > 0) {

rihardsgTopic starter

After enabling "dump" it was possible to catch request or response errors
In facebook case there should be disabled "read_friendlists" request
In Google case there was API misconfiguration @ google side
Now all 3 providers are responsing with righ data without errors
Simply after recieving callback.php?provider_andTokens nothing happens
no error messages in logs, no redirects, just blank screen in all 3 scenarious
  •  

PHPVibe A.

Hey Richard, do you have the very latest version installed?

PHPVibe A.

I can login ok with Google plus, Twitter indeed is throwing a blank page (no error, output), don't have Facebook but I can ask somebody to test.

PHPVibe A.

Ok, Facebook has an app side issue:

QuoteApp Not Set Up: This app is still in development mode, and you don't have access to it. Switch to a registered test user or ask an app admin for permissions.

So, can't test right now.

Anything in the error_log related to the Twitter blank screen?
I understand it dumps the variables, but any error somewhere?

rihardsgTopic starter

After switching on mysql debug I have found the reason
MysQL database requiring email as unique field
Since I've been testing login with 3 my twitter, google and facebook acounts with similar email, after returning data , Mysql fail to insert new field with error" "can't insert duplicate in field" email.
The same happening in case hat service provider returns empty email field. since there are one record with similar value.
As temprary solution, I had changed "email_uni" in indexeses from unique to normal.
Now everything seems working.
Problem that in mysql table are 3 different recordds with same email address but different authenticators.
However system should sort out such scenarios, and check if similar email exists - then log in the particular account despite authentication provider.
Mayby it is possible to write an update?
  •  

PHPVibe A.

Basically this is how it works, it checks for the e-mail  and provider (which fails if provider is different).
Hmm, try this,

in lib/functions.user.php uncomment this:

/* Uncomment below for multiple logins to same account */
/* 
if(isset($userData['email']) && !nullval($userData['email'])) {
if (!filter_var($userData['email'], FILTER_VALIDATE_EMAIL) === false) {
if(user::CheckMail($userData['email']) > 0)	{
$result = $db->get_var("SELECT id FROM ".DB_PREFIX."users WHERE email ='" . toDb($userData['email']) . "'");
return 	$result;
}
}
}*/

xxxronaldxxx

  •  

vincent1986

I have reviewed all the information that you help above.
I have applied but have not overcome.
Visit my condition when sign in with about facebook:
please help me. Thanks very much!

Notice: Undefined variable: user_profile in /home/vsupward/public_html/callback.php on line 51

Notice: Undefined index: id in /home/vsupward/public_html/callback.php on line 59

Notice: Undefined index: name in /home/vsupward/public_html/callback.php on line 60

Notice: Undefined index: username in /home/vsupward/public_html/callback.php on line 61

Notice: Undefined index: email in /home/vsupward/public_html/callback.php on line 62

Notice: Undefined index: email in /home/vsupward/public_html/callback.php on line 65

Notice: Undefined index: bio in /home/vsupward/public_html/callback.php on line 66

Notice: Undefined index: gender in /home/vsupward/public_html/callback.php on line 67
Error. Please go back
  •  

PHPVibe A.

Hi, did you review your app? It has a review/test option in Facebook, it sounds like Fb doesn't return any details.

Similar topics (7)