Authentication: Oauth2 authentication plugin for Moodle (for Moodle 3.2 and earlier)

Maintained by Picture of Sergio Rabellino Sergio Rabellino
Sign-in with an Oauth2 provider. The first time you sign-in, a new account is created.
2075 sites
253 fans

Plugin end of life starting from Moodle 3.3

starting from Moodle 3.3, Oauth2 should be implemented in Moodle core. It will require you to upgrade to Moodle 3.3 and switch to the Oauth2 core authentication (and probably do some migration), but it is a great news as authentication is a really sensible matter and having Oauth2 plugins in core will guarantee their maintenance. So starting from Moodle 3.3 I highly recommend to use the new Oauth2 core plugins (( ) . Missing core providers will likely be implemented by someone and published in the plugin repository. There will probably be a new Oauth2 category in the Moodle plugin repository. Wait and see...

I will try to mantain this plugin until Moodle 3.1 (LTS) runs out of security upport  (13 May 2019).

Warning for Facebook users 

The plugin stopped working the 27th March 2017 as Facebook closed the API 2.2. The last versions of this plugin have been updated to support Facebook 2.8 API. As usual carefully test before upgrading a third party plugin if your Moodle site is important to you (especially as it is an authentication plugin)


  1. add the plugin into /auth/googleoauth2/
  2. in the Moodle administration, enable the plugin (Admin block > Plugins > Authentication)
  3. in the plugin admin page, follow the displayed instructions.

I also created a free mini-course on how to install a Moodle plugin using Oauth2 plugin as example.

Documentation and support

You can search in all existing issues on Github. Go to the issues page, next to the filter button there is a search field. Remove the default content, type your keywords and press enter.

There is a FAQ too.

Alternative plugins

There are many alternatives to this plugin, if you have any trouble with this plugin it may be a good idea to try them:


This plugin is part of set OAuth2.


Screenshot #0


Picture of Sergio Rabellino
Sergio Rabellino (Lead maintainer)
Picture of Jérôme Mouneyrac
Jérôme Mouneyrac: Original author and previous maintainer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Phuong Hoang
    Thu, 6 Apr 2017, 5:03 PM
    Hi guys,
    Help me!
    Most of my users log in my site via facebook and gmail. Unfortunately, neither of them works when I upgrade this plugin to Release 2.3 (Build: 2016061204). I know "The plugin stopped working the 27th March 2017 as Facebook closed the API 2.2. The last versions of this plugin have been updated to support Facebook 2.8 API". My App's API version 2.3, when I upgrade API, it says; Your app hasn't made enough calls to the Graph API to show any info, or there are no changes for the methods you selected between v2.3 and v2.8.
    Now my site is using release 2.3 (Build: 2016061202) and only gmail works.
    Any suggestions are apprecited.
    I'm using moodle 3.2.2
  • Picture of Phuong Hoang
    Thu, 6 Apr 2017, 9:45 PM
    The lastest release is NOT Release 2.3 (Build: 2016061204), plz check!
  • Picture of David Mudrák
    Thu, 6 Apr 2017, 10:17 PM

    I am happy to announce that this plugin has been adopted! The new maintainer is Sergio Rabellino, the head of the ICT services of the University of Turin. Good luck and thanks for keeping this plugin supported!

  • Picture of Jérôme Mouneyrac
    Thu, 6 Apr 2017, 10:22 PM
    Hi guys

    Due to lack of time, I hand over the plugin maintenance to Sergio Rabellino. Sergio is a well known Moodler and he will be more than qualified to maintain the plugin.

    Sergio accepted to maintain the plugin until the Oauth2 core plugin stabilises. So you should have time to move over to the Oauth2 core plugin introduced in Moodle 3.3 - we expect you to have moved to it by mid 2019.

    We transfered the official repository from my Github account to his Github account there: So if you are using Github, there will be no impact for you as Github should automatically redirect the previous git repository url to the new one.

    I would like to thank Sergio to take over, I really appreciate it, and I wish you all the best in your new adventure as maintainer.

    I also thank Moodle HQ that allowed me to work on the plugin during a project week, Guillermo from (the unique donator in 5 years), the Moodle Partner Elearning Experts LLC. to have contracted me to update the code to support a Google API change, and also all the contributors.

    Kind Regards to everyone,

    Jerome Mouneyrac
  • Picture of Sergio Rabellino
    Thu, 6 Apr 2017, 10:30 PM
    Thanks to Jerome for the time spent in developing this useful plugin. I hope that he will be always here (or around) to control my baby-sitting work,..
    For the other people, stay tuned! I've done the phpleague plugin update, soon available on github and in download...
  • Picture of Baljé Weber
    Mon, 10 Apr 2017, 10:26 PM
    Where can if ind documentation about adding my own vendor. I am using the product for a project i am doing and they have their own method (very similar to all other methods) but i don't understand the league reference. Could someone pleas direct me in the correct direction?
  • Picture of Sergio Rabellino
    Tue, 11 Apr 2017, 6:56 AM
    You can get all the required information here:
  • Picture of Angelo Agujo
    Tue, 18 Apr 2017, 9:05 AM
    We have recently upgraded to Moodle 3.2.2 and our Google authentication button (Oauth 2) on our Moodle login page has disappeared. Can you advise how to resolve please? Is this an issue with Google, Moodle or Oauth? Any help much appreciated.
    Thanks, Angelo
  • Picture of Sergio Rabellino
    Tue, 18 Apr 2017, 4:08 PM
    PLease don't send issues on the plugin comments, but open an issue on github plugin project:
  • Picture of Sebastian Castellanos
    Fri, 5 May 2017, 8:59 PM
    Hi, thanks for the plugin, it really make it user for our users.

    One question, I want to change the position of the buttons ex: , google, facebook, , right now they are bellow normal login button, but I want to move it under the button of Create new Account button (the div that is on the right ), I searched undr : auth/googleoauth2 but did not found anything ...
    Any help is very good welcomed smile

    Best Regards,
  • Picture of Sergio Rabellino
    Fri, 5 May 2017, 9:42 PM
    As i wrote in my previous post here, the requests/bugs/suggestions should be posted opening an issue on the github plugin project. A github issue it's more traceable and admits some integration into the plugin development phases. Anyway you should only change the script.js file, modifying the jquery code used to identify in the login page the div element to which you want append the button's code.
  • Picture of Phuong Hoang
    Wed, 17 May 2017, 11:07 AM
    Hi guys,
    Before upgrading to moodle 3.3 I try to uninstall this plugin; however, I failed. Therefore, I deleted this folder on host and in database. After I upgraded, moodle said this plugin was missing from disk. In short, I'd like to know how can I uninstall this plugin?
  • Picture of Francisco Javier Landa Torres
    Mon, 29 May 2017, 2:28 PM
    Hi everyone!
    I hope can help me with this plugin. The login with Facebook is login perfectly, but I have tested an escenario which is "the user denied permission from Facebook". When I do this escenario the system redirected me to a page in my Moodle system with the message: auth_googleoauth2/facebook_failure. Anyone have an idea to process correctly this redirect? when the user denied permission from Facebook?
  • Picture of Jérôme Mouneyrac
    Thu, 22 Jun 2017, 1:07 PM
    Phuong: I would advice to restore the plugin files and disable the authenticatuon plugin from the admin. Unfortunately the uninstall code is not in the plugin so you can not uninstall it (if you are a PHP dev it is not very complicated if you want to add the uninstall code, it will just take you some time)
  • Picture of Kim Chambers
    Tue, 18 Jul 2017, 3:54 PM
    Can anyone advise if it is possible for this plugin to send emails to the Teacher or Site Admin when someone registers using this format?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Please login to post comments