Social Login

Re: Social Login

by Kushan Rathnasekara -
Number of replies: 0
Dear Sir,

Thank you very much for your guidance you extended to me in resolving social login (Facebook) issue. Today I've figured out what went wrong and i was able to resolve the same. For other those have the following issue, when configuring the facebook login for the moodle I would like to share my experience as I was looking to resolve this like from 7 months.
1. Your moodle server should be in HTTPS://
2. If any case if you installed the SSS certificate after installing the moodle in a http:// you should visit config.php and change the following changes.
a. $CFG->wwwroot = 'https://www.yourdomain.com'; // change http to https
b. $CFG->sslproxy = true; //include this line
3. Then you configure Facebook login the following error may come.
URL blocked: This redirect failed because the redirect URI is not white-listed in the app's client OAuth settings. Make sure that the client and web OAuth logins are on and add all your app domains as valid OAuth redirect URIs.

4. To resolve the issue, under facebook developer app settings If your Valid OAuth Redirect URIs is https://yourdomain.com/admin/oauth2callback.php in addition to that you have to include https://www.yourdomain.com/admin/oauth2callback.php as well. (www part also added as separate URI) This www added URI will fail under Redirect URI to Check validator. However, it should be entered under Valid OAuth Redirect URIs.

Thank you..