Maintained by Picture of Sergio RabellinoSergio Rabellino
Sign-in with an Oauth2 provider. The first time you sign-in, a new account is created.
1185 sites
459 downloads
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 ((https://docs.moodle.org/dev/Better_Office_Integrations_3.3#Core_API_for_managing_Authorized_OAuth_Applications) ) . Missing core providers will likely be implemented by someone and published in the Moodle.org 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)


Installation

  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:

Sets

This plugin is part of set OAuth2.

Screenshots

Screenshot #0

Contributors

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

Comments

  • Picture of William Michael
    Thu, Sep 24, 2015, 12:58 AM
    Updated our Oauth2 plugin this morning and it's disrupted login on our site. Noticed a new Google login button.

    1. User clicks new Google login button.
    2. Selects Google Account to use for sign in.
    3. User is returned to the LMS without being logged in.

    Obviously, this is a big problem...any help would be appreciated. Worked perfectly for months before update was installed. Nothing else has been changed.

    Thank you,
    William Michael
    Classical Liberal Arts Academy
  • Picture of Sébastien Petit
    Sun, Sep 27, 2015, 6:53 PM
    Hello there, I've set up your nice plugin & I can see it helping my forgetful students a lot...
    Technical detail: isn't the plugin supposed to pull out the Facebook/Google+ account picture?
  • Picture of Jérôme Mouneyrac
    Sun, Sep 27, 2015, 8:53 PM
    Hi Sebastien, the plugin retrieves the profile picture for battle.net only. I didn't implement the other provider image yet, I will do it later when I have some free time. If anyone want to implement it is very easy as I wrote most code for battle.net. cheers.
  • Picture of William Michael
    Mon, Sep 28, 2015, 7:19 AM
    Obviously, this is a helpful plugin, especially as schools (like ours) adopt Google Apps for Education, since this plugin allows easy sign-in into Moodle with student Google accounts and no need for additional usernames and passwords.

    I ran into some trouble (see above) on 9/24/2015, when installing an update for this plugin. The update caused trouble and all of my users who had authenticated with this method (just over 500) could not sign into our LMS. We had to convert many of them to manual login (not fun) as we tried to figure out how to fix the problem. Mr. Mouneyrac was helpful in suggesting fixes after I contacted him by email. In the end, I just deleted the plugin folder from the server, installed the latest version of the plugin and it was fixed (there's no uninstall feature with this plugin, so I couldn't uninstall and re-install).

    When running, this is a great plugin. If something goes bad...users can't sign in...and that can be a mess. So, install updates with caution.
  • Picture of Jérôme Mouneyrac
    Mon, Sep 28, 2015, 1:35 PM
    I agree, Moodle admins should always test before installing/upgrading a critical plugin or a major Moodle install (for example have a duplicate of your production site on a different url).

    About the issue, we don't know what was William's version.php file before the upgrade, so it is not easy to reproduce. I wrote this issue https://github.com/mouneyrac/moodle-auth_googleoauth2/issues/168 to make further investigation. Maybe it could also be a file permission issue as the Moodle.org upgrade process requires to change the auth folder permission. William, if you didn't delete the database table, but only the files, it may have been a permission problem in fact. Note: people can uninstall this plugin from Moodle (I think smile). What there is not, is some specific uninstall code, and I can not remember if Moodle read the install.xml file during the uninstall process.

    Also I would like to add that I appreciate if we could all keep support for this plugin on Github. Not here, and especially not by email, as it does not benefit others. Finally when I maintain this plugin or when I personally answer someone about this plugin, I give you my time. If you appreciate it you can "Favorite this plugin" on this page smile
  • Picture of Przemek Malik
    Mon, Sep 28, 2015, 6:52 PM
    I have problem with this plugin - when users starting to login thru Google accounts, the plugin disabling itself :/ Any ideas whats going wrong? It's a known problem?
  • Picture of Jérôme Mouneyrac
    Mon, Sep 28, 2015, 8:00 PM
    Just for the info I tested upgrade and it works. I installed a 2.5 site (plugin installed with Moodle.org plugin rep) then I upgrade the site straight to 2.9. Then through the Moodle admin I updated the Oauth2 plugin to the last plugin version (it is googleoauth2 2.1), it worked perfectly. My user that I used to login with Google was still able to login in.
  • Picture of Jérôme Mouneyrac
    Mon, Sep 28, 2015, 8:09 PM
    Premezek: it seems very weird, I never heard of anything like the plugin been disabled automatically. Would you be able to do a screencast to demonstrate the problem? Then publish it on github. Thanks.
  • Picture of Jonatan martinez
    Tue, Sep 29, 2015, 5:15 AM
    Thanks for developing this valuable plugin.
    but, Do I want to know if this works with moodle moblie application ?
  • Picture of Jérôme Mouneyrac
    Tue, Sep 29, 2015, 9:26 PM
    Hi Jonatan, this plugin won't help to authenticate in the Moodle mobile app - the mobile app currently authenticate by web service to Moodle - so except if Moodle became an authentication provider recently (and in this case we may be able to authenticate in Moodle through Google, then authenticate to the mobile app through Moodle) I don't think it is possible. Note that Moodle do provide some authentication through Mnet and other people already implemented Moodle as an authentication provider but I don't think any of that provide authentication to mobile apps.
  • Picture of James Nicolson
    Thu, Oct 1, 2015, 4:39 AM
    Hi Jerome, simple question hopefully. I've installed the plugin, enabled under manage authentication and checked the settings to make sure they are valid including the mappings but I still cannot see the button. Is there another setting I am missing to show the button?
  • Picture of William Michael
    Thu, Oct 1, 2015, 4:53 AM
    James,

    I apologize if this is obvious and not the problem, but there's a box on the Oauth2 settings page that needs to be checked to "Display buttons on login page"
    Go to: Site Admin > Plugins > Authentication > Oauth2
    Screenshot: http://www.awesomescreenshot.com/image/621933/c8e6cde26df1d3e3889abe3a2fdb82b8

    Good luck,
    WM
  • Picture of James Nicolson
    Thu, Oct 1, 2015, 5:17 AM
    Thanks William, do oauth2 and googleoauth2 work in conjunction with each other? The next question; is there a good way or tutorial for creating the client ID and secret using the google API?
  • Picture of William Michael
    Thu, Oct 1, 2015, 5:29 AM
    James,

    At the top of that Oatuth settings page in Moodle, there's a link to the Google Developer site you need to create the credentials. See here: http://www.awesomescreenshot.com/image/622020/406b83566e23605c1641210f5fd92829

    WM
  • Picture of William Michael
    Thu, Oct 1, 2015, 5:31 AM
Please login to post comments