The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
Social Logins - Anyone actually get them to work? - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: Social Logins - Anyone actually get them to work? (/showthread.php?tid=1089)



Social Logins - Anyone actually get them to work? - steve123123 - 07-02-2018

Unable to get google login or facebook login working.

Google login: During the signup/login process, the google webpage shows up stating: Sign in with Google.  After a valid username/pass is entered, it redirect back to the login page.


Facebook: Anyone know what the values under "Facebook Graph Version - Formatted as v2.2" and "Redirect After Facebook Login" should be?  I receive the following error when logging in: "[font=Times New Roman]Graph returned an error: Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings. I already added the domain into the app domains field. [/font]

[font=Times New Roman]Anyone actually get this to work?[/font]


RE: Social Logins - Anyone actually get them to work? - Brandin - 07-02-2018

Hello,

Please verify you followed these steps:
https://userspice.com/social-logins/

Thank you,
Brandin.


RE: Social Logins - Anyone actually get them to work? - steve123123 - 07-02-2018

(07-02-2018, 10:58 PM)Brandin Wrote: Hello,

Please verify you followed these steps:
https://userspice.com/social-logins/

Thank you,
Brandin.

yes, i followed the exact instructions listed.


RE: Social Logins - Anyone actually get them to work? - steve123123 - 07-03-2018

Found the fix in another users post for facebook. can you add this into the next patch?

"Made changes on file /users/src/Facebook/Helpers/FacebookRedirectLoginHelper.php

in line 226, from:
$redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['state']);

to:
$redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['code', 'state']);"

Also set "Redirect After Facebook Login" to your domain. Any idea what value should be in "Facebook Graph Version - Formatted as v2.2"?


RE: Social Logins - Anyone actually get them to work? - steve123123 - 07-03-2018

Google login shows the following errors:
Notice: Undefined offset: 0 in /home/myg/portal.domain.com/users/classes/DB.php on line 279
Notice: Trying to get property 'id' of non-object in /home/myg/portal.domain.com/users/includes/google_oauth.php on line 81
Notice: Trying to get property 'id' of non-object in /home/myg/portal.domain.com/users/includes/google_oauth.php on line 87


RE: Social Logins - Anyone actually get them to work? - Brandin - 07-03-2018

(07-03-2018, 01:20 AM)steve123123 Wrote: Found the fix in another users post for facebook. can you add this into the next patch?

"Made changes on file /users/src/Facebook/Helpers/FacebookRedirectLoginHelper.php

in line 226, from:
$redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['state']);

to:
$redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['code', 'state']);"

Also set "Redirect After Facebook Login" to your domain. Any idea what value should be in "Facebook Graph Version - Formatted as v2.2"?

I remember this problem-and we've patched it already for a 4.4 release.

(07-03-2018, 04:23 AM)steve123123 Wrote: Google login shows the following errors:
Notice: Undefined offset: 0 in /home/myg/portal.domain.com/users/classes/DB.php on line 279
Notice: Trying to get property 'id' of non-object in /home/myg/portal.domain.com/users/includes/google_oauth.php on line 81
Notice: Trying to get property 'id' of non-object in /home/myg/portal.domain.com/users/includes/google_oauth.php on line 87

I will try to look this later for you.


RE: Social Logins - Anyone actually get them to work? - steve123123 - 08-04-2018

(07-03-2018, 11:01 AM)Brandin Wrote:
(07-03-2018, 01:20 AM)steve123123 Wrote: Found the fix in another users post for facebook.  can you add this into the next patch?  

"Made changes on file /users/src/Facebook/Helpers/FacebookRedirectLoginHelper.php

in line 226, from:
$redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['state']);

to:
$redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['code', 'state']);"

Also set "Redirect After Facebook Login" to your domain.  Any idea what value should be in "Facebook Graph Version - Formatted as v2.2"?

I remember this problem-and we've patched it already for a 4.4 release.

(07-03-2018, 04:23 AM)steve123123 Wrote: Google login shows the following errors:
Notice: Undefined offset: 0 in /home/myg/portal.domain.com/users/classes/DB.php on line 279
Notice: Trying to get property 'id' of non-object in /home/myg/portal.domain.com/users/includes/google_oauth.php on line 81
Notice: Trying to get property 'id' of non-object in /home/myg/portal.domain.com/users/includes/google_oauth.php on line 87

I will try to look this later for you.
any update?


RE: Social Logins - Anyone actually get them to work? - Brandin - 08-04-2018

Hi, I've looked into this and cannot reproduce in 4.4. What action did you take that caused this to occur?

Thank you.


RE: Social Logins - Anyone actually get them to work? - steve123123 - 08-04-2018

(08-04-2018, 04:05 AM)Brandin Wrote: Hi, I've looked into this and cannot reproduce in 4.4. What action did you take that caused this to occur?

Thank you.

when is 4.4 being released?  latest version for me is 4.3.25.

my values:
clientid and client secret match the values given by google.
Full Home URL of Website - include the final /: https://portal.domain.com/
Google Redirect URL (Path to oauth_success.php): https://portal.domain.com/users/oauth_success.php

In google console:
Authorized redirect URIs: https://portal.domain.com/users/oauth_success.php

Errors:
Notice: Undefined offset: 0 in /home/mygasdfd/portal.domain.com/users/classes/DB.php on line 279

Notice: Trying to get property 'id' of non-object in /home/mygasdfd/portal.domain.com/users/includes/google_oauth.php on line 81

Notice: Trying to get property 'id' of non-object in /home/mygasdfd/portal.domain.com/users/includes/google_oauth.php on line 87