Maintained by Picture of Sergio RabellinoSergio Rabellino
Sign-in with an Oauth2 provider. The first time you sign-in, a new account is created.
1181 sites
269 fans
Current versions available: 3

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


  • Picture of William Michael
    Thu, Oct 1, 2015, 5:40 AM
    Once there...
    1. Create Project > Give Project a name > Create
    2. Select "APIs and Auth" > APIs > Select "Google+ API" > Enable Google+ API
    3. Back to "APIs and Auth" > Credentials > Add Credentials > OAuth 2.0 Client ID >
    4. However, it requires that you first configure the consent screen, so do that...most of it is can fancy it up if you like.
    5. Select "Web Application", then give it a name, then paste the info from your Moodle Oauth2 settings page into the boxes and hit "Create".
    6. That should be it.

  • Picture of James Nicolson
    Thu, Oct 1, 2015, 5:54 AM
    Thank you for your help. Once i got rid of a trailing space the auth worked fine. That is great. I really appreciate your detailed help.
  • Picture of Jérôme Mouneyrac
    Thu, Oct 1, 2015, 11:29 AM
    Thanks William for helping James smile I will try to make some video demonstrating how to set it up.
  • Picture of Mark Roberts
    Fri, Oct 2, 2015, 8:37 AM
    Hi, I've successfully set up the plugin to work with Google, but it isn't working with Facebook. Unfortunately, the procedure seems to have changed a bit for setting up the app with Facebook (I noticed this issue on Github). Could you possible let me know in addition to the email address, what other settings need to be enabled / set for Facebook? Thanks!
  • Picture of Santiago Andrade
    Thu, Oct 8, 2015, 6:01 AM
    Hello, I have the following problem in my moodle 2.9.1 platform , my platform was functioning common and current , when I got the idea of ​​installing this plug-in.

    When I Installed the plug -in and it is finished, the website goes to: my_url/admin/index.php and can't get loaded !!!! Also whenever moodle income , there is routed automatically to my_url/admin/index.php and the page isn't loaded again !!! I Looked for another ways to remove the extension but not where it is ?? .... someone could help me please ??
  • Picture of Jérôme Mouneyrac
    Thu, Oct 8, 2015, 2:56 PM
    Hi Santiago,
    sorry I am not sure to understand your problem. All Moodle plugins when they got installed trigger my_url/admin/index.php. Can you post a screencast video somewhere (youtube for example) to demo your issues. Cheers, Jerome
  • Picture of Jérôme Mouneyrac
    Thu, Oct 8, 2015, 2:58 PM
    Mark: I am planning to do a demo video for installing the plugin later (as you mentioned providers are super good to change their admin pages and terms every years). For the moment you will have to read facebook docs, google how to do it... etc. It is a very common process, demo video must already exists in plenty of place, just need to find them smile
  • Picture of Santiago Andrade
    Thu, Oct 8, 2015, 8:56 PM
    Hi Jerome,

    I did the video:

    When I get log in, always moodle gets automatically to roated to /admin/index.php and the page doesn´t get loaded!!!

    Please I need help to resolve this problem!

  • Picture of Jérôme Mouneyrac
    Thu, Oct 8, 2015, 9:43 PM
    Santiago: enable debug like explained in and tell us what is your error message.
  • Picture of Santiago Andrade
    Fri, Oct 9, 2015, 3:20 AM
    Hi Jerome, I just resolve the error!!! It was in php.ini, I changed the vuale: the max_execution_time = 360 , and now the page loads!!!!
    Anyway thanks a lot for your help Jerome!!!
  • Picture of Jonatan martinez
    Tue, Oct 20, 2015, 5:53 AM
    Solución al problema de logout de google
    Hola, nuevamente te escribo por el inconveniente que tenia al cerrar la sesión de moodle no cerraba sesión de cuentas google, pero hice que cuando el usuario salga de moodle redirija a la pagina de

    Espero puedas mejorar con esta información el plugin
    y gracias nuevamente por tu aporte
  • Picture of Jérôme Mouneyrac
    Thu, Oct 29, 2015, 11:44 PM
    Thanks William for reporting this potential security issue. Can you email me the details? Just for the info, normally try to contact the plugin maintainer before announcing a potential security problem ( It avoids potential hackers to take advantage of it.
  • Picture of William Michael
    Thu, Oct 29, 2015, 11:47 PM end user would know that the Moodle Security Procedures document exists. smile
  • Picture of Helen Foster
    Fri, Oct 30, 2015, 12:36 AM
    William, I have deleted your previous comment as requested by Jerome. The Moodle security procedures doc is linked to from though we obviously need to make it easier to find. Thanks for pointing this out. smile
  • Campamento de robotica educativa
    Thu, Nov 5, 2015, 4:54 AM
    Debug info:
    Error code: couldnotgetgoogleaccesstoken
    Stack trace:
    • line 436 of /auth/googleoauth2/auth.php: moodle_exception thrown
    • line 89 of /login/index.php: call to auth_plugin_googleoauth2->loginpage_hook()
Please login to post comments