Closed Mr-Penguin closed 8 years ago
+1 me too !! installed manually and with composer too , the same error !!
If i downgrade ZfcUser to 0.1.2 it skips the error and redirects to login page with error message "Authentication failed"
Yes, the same problem. Auth event was stopped without a response. Got "boolean" instead
You are likely getting to one of the error cases in this class: https://github.com/SocalNick/ScnSocialAuth/blob/master/src/ScnSocialAuth/Authentication/Adapter/HybridAuth.php
Can you add some debugging to determine where it is bailing out of the authenticate method?
'email' => string '' 'emailVerified' => string '' and throw exception on https://github.com/SocalNick/ScnSocialAuth/blob/master/src/ScnSocialAuth/Authentication/Adapter/HybridAuth.php#L359-L360 Please verify your email with Facebook before attempting login
If someone would like to explore what it would take to deliver a better message to the user, I'd be happy to look at a PR.
ScnSocialAuth\Authentication\Adapter\HybridAuth in function authenticate and line 112.
If you add var_dump($ex); die();
You will get the RuntimeException , with the error message
["message":protected]=> string(62) "Please verify your email with Facebook before attempting login"
Which means the problem is in line 357 function facebookToLocalUser
then i tried a var_dump to $userProfile and as wizard2014 said the result is
["email"]=> string(0) "" ["emailVerified"]=> string(0) ""
strange because i added email at my scope !
So searching in depth , seems that the problem is in the hybridauth library.
hybridauth/hybridauth/hybridauth/Hybrid/Providers/Facebook in function getUserProfile
line 163
$data = $this->api->api('/me');
and some lines after this we have lines like this
$this->user->profile->email = (array_key_exists('email',$data))?$data['email']:"";
Every $this->user->profile->xxx property will be "" because $data is an array with only name and id !!
If you manually add $data = $this->api->api('/me?fields=email'); it will return email too !
So i think there is the problem !
I don't think this is a problem with HybridAuth. Users need to verify their email with Facebook before HybridAuth / ScnSocialAuth should authenticate the user.
This module needs to properly display the error message to the user. I'll gladly review a PR to fix.
I don't think it has to do with the facebook account details !
"Users need to verify their email with Facebook before HybridAuth / ScnSocialAuth should authenticate the user."
My facebook email is verified !
As i said the return data from facebook are only the id and name but if i ask for email it returns the email too !
Yes, that is right. If we manually add '/me?fields=email' we'll get email.
Same problem here. Anyone got a quick fix for now?
Nice! But this is a master branch. Seeing as how they are working on a 3.0.0 version I'm assuming it will be in there. Question that rises is whether ScnSocialAuth will still support it, since it asks for 2.4.* now. I'll test it out later.
Still getting the error with the latest commit. Anyone else who can confirm this?
@CasperF Nope, I tried what @invader7 posted and it worked for me. Thanks for the post.
@invader7. Yes, it works.
Looks like the commit is on master which is 2.4.2-dev. Just need to wait for them to cut a 2.4.2 final release.
Will there be support for 2.5 of HybridAuth any time soon? I'm getting the error described above if i put in 'email' as the facebook scope. I'm just getting started with this... :) thx!
Get the error when trying to login with Facebook. (This error happens after I logged in to Facebook) Saw a similar issue here, issue:91.
Stacktrace:
Is it just me or is there something broken?
If I var_dump the event ($e) at AdapterChain.php#L63my page will get miles long. Your help is as always appreciated.
PS: zfc-user version v1.2.2 scnsocial v1.17.2 hybridauth v2.4.1