Social Login

Social Login

by Kushan Rathnasekara -
Number of replies: 8

Dear All,

Need a great help.

I tried to enable social login (facebook) for my moodle 3.5x site according to the instructions of https://docs.moodle.org/33/en/OAuth_2_Facebook_service .

However, once i completed the steps the following error appears. (error/could not upgrade the oauth token- pls refer the attachment)

During the configuration

1.  i used callback URL as https://ek.edu.lk/admin/oauth2callback.php ( my url is http://ek.edu.lk)

2. i couldn't find an option to follow the following instruction " 7. Click 'App Review' on the left, then click to make your app public."

Please guide... Urgent attention is highly appreciated.

Thank you so much !






Average of ratings: -
In reply to Kushan Rathnasekara

Re: Social Login

by Ken Task -
Picture of Particularly helpful Moodlers

Qualfications for this response ... none ... but do use Google IAM ... similar to Facebook?  Plus ... if nothing else, you have a response ... and discussion/cussion has begun! smile

Did you click the 'more info about this error' link?  What did it say?

Would think version docs might make a difference ... your Moodle version 3.5.x one should refer to docs for that version if still available:

https://docs.moodle.org/35/en/OAuth_2_Facebook_service

And, would also think any/all URL's involved in config would be using https:// (tls) with valid certs.

Plus, read the other day that some browsers are now requiring use of TLS 1.3 or higher.  You can check your server certs via SSLLabs tool.

https://www.ssllabs.com/ssltest/

'SoS', Ken

Average of ratings: Useful (1)
In reply to Kushan Rathnasekara

Re: Social Login

by Kushan Rathnasekara -

Pls guide.. Urgent solution required.. Txs a lot.. 

In reply to Kushan Rathnasekara

Re: Social Login

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Have you tried Ken's ideas?

Have you tried a Google search, such as "moodle docs facebook login"?

Incidentally, I don't use this type of login for my Moodle, so I can't guide you much further. I am just trying to help with your "urgent" request.
Average of ratings: Useful (1)
In reply to Kushan Rathnasekara

Re: Social Login

by Mohammad Nabil -
few months ago i used facebook login according to moodle doc , and it work fine
just check if facebook made some changes or need additional step
In reply to Mohammad Nabil

Re: Social Login

by Phuong Hoang -

Hi moodlers,

I must say that https://docs.moodle.org/35/en/OAuth_2_services is out of date. Please update for someone in need. Today I configured OAuth_2_Facebook_service for my customer. I realized that some appearance and steps are a little different. For example, "Step 3. Click Settings on the left, then add an app icon and URLs as desired, choose a category e.g. Education then click the button 'Save Changes'." I had to fill in Privacy Policy URL and in "step 7. Click 'App Review' on the left, then click to make your app public.", I had to click "In development" to the App LIVE then a popup appeared and chose "SWITCH MODE". Finally, OAuth_2_Facebook_service worked fine!

In reply to Phuong Hoang

Re: Social Login

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
It is a Wiki, you can edit it yourself. Please update with what you have found out.
In reply to Phuong Hoang

Re: Social Login

by Kushan Rathnasekara -

Dear Sir,
Could you please guide me for set up FB login (Social login) for my moodle site. I couldn't do that. Is it required the facebook developers to review my app personally to ensure the social login ??? Pls Guide. Great Help.
Thanks a lot..

My site is http://ek.edu.lk (You may click the FB login and see what happens)

The error appears is attached for your reference please.


In reply to Phuong Hoang

Re: Social Login

by Kushan Rathnasekara -
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..