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

Authentication ::: auth_googleoauth2
Maintained by Sergio Rabellino
Part of set OAuth2.
Sign-in with an Oauth2 provider. The first time you sign-in, a new account is created.
Latest release:
628 sites
119 downloads
272 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:

Screenshots

Screenshot #0

Contributors

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

Comments RSS

Comments

  • Jérôme Mouneyrac
    Sun, 12 June 2016, 7:39 PM
    Hi guys, don't forget to search for existing issues on https://github.com/mouneyrac/moodle-auth_googleoauth2/issues and add issue report on Github too when you can not find a solution.

    Plugin developers can not disable comments on their Moodle.org plugin page, and having both these Moodle.org comments and github issues make things difficult to manage for me, and even more annoying for you as you may miss information here or on Github (depending what you check).

    So to summarize, let's all use Github, it is much easier to search for an existing issue reports there.

    Cheers smile
  • Ziyad Muslat
    Wed, 10 Aug 2016, 1:25 AM
    We use hidden categories to control who can see live courses. The issue is for students that are added in moodle manually, they would not see a course in a hidden category unless they are enrolled the course. However, users who are using this plugin can see these courses ( though they cannot enroll), but we want them to not be able to see these courses completely.
    Our site assigns the "Authenticated user at front page" to all users by default, but this doe not seem to be applied to the social users.

    Does anyone have a solution? Does the plugin assign a specific role to users who login using their social media plugin?
  • Joenn Aquilino
    Sun, 4 Sept 2016, 11:26 AM
    Hello,

    First off, I would like to say that this is such a great plugin, thanks!
    I've a question, would it be possible to change the button's location?

    Thanks!
  • Bert van der Hooft
    Mon, 17 Oct 2016, 7:12 PM
    Dear Jérôme,

    Trying to get linkedin authentication working. But whatever I do I get the message "invalid redirect_url...." of an authentication error.
    Could you help: which field in Linkedin register application page must be set whit which value. You short description in the settings confuses me.

    Best regards,

    Bert
  • Jérôme Mouneyrac
    Tue, 18 Oct 2016, 10:45 AM
    Hi Bert,
    the problem with Oauth2 is that the providers change **very** regularly the way they implement it and even more the way you set it up. We (the "we" of likely no-one is going to do it - equivalent to someone needs ... :D) "just" (another funny word smile) need to update the plugin as it goes. From memory, one thing I remember happening twice with providers returning "invalid redirect_url" was because the providers decided that from now the redirect_url needed to be HTTPS otherwise they refused to authenticate the user. I would check that if I were you, maybe it will solve your issue... sorry to not be more helpful to you at this time. I do want to give a lot of time to the plugin and to put up with some good - long time required - maintenance.
  • Rafael Lopes Computel
    Fri, 28 Oct 2016, 3:05 AM
    Hi, i can't login with facebook. Any help?

    Error message:
    "The site succeed to connect to the selected provider but failed to retrieve your user details. If you are using Google, check that your site administrator has enabled the Google+ API in the Google developer console. It is the most common reason for this error."
  • Jérôme Mouneyrac
    Thu, 3 Nov 2016, 3:48 PM
    Hi guys, Facebook is not working with Facebook API 2.8. So basically if you have an old API key for an old Facebook API it is working otherwise we'll have to wait the next plugin big update (unfortunately due to no free time from my side, it is not planned and has no date).
  • david gerber
    Sat, 24 Dec 2016, 7:52 AM
    Having issues with iptables and this plugin--I can't figure out what to open up so it gets through iptables -- works fine until i provide a cleanup drop command, but it then gets dropped with this error: Exception - [curl] 6: Could not resolve host: accounts.google.com [url] https://accounts.google.com/o/oauth2/token
  • Emanuele Aloi
    Thu, 16 Feb 2017, 10:56 PM
    Hello everybody,

    For an Academic Research, I'm trying to find a way to ask users permission to view their "facebook likes". Until now it seemed to understand that it must necessarily use Graph API.
    This plugin could help me in any way?

    thank you,
    Ema
  • Edmund Evangelista
    Wed, 22 Feb 2017, 5:34 PM
    Is there a way using sql script to determine the number of files uploaded by a faculty in a course through Dropbox and Google Drive?
  • Sebastian Castellanos
    Fri, 17 Mar 2017, 11:59 PM
    Hi, Thanks for the plugin! is working perfect, I've configured for facebook and for gmail.
    The information that I'm retrieving is very basic, like name, lastname and photo. Exist any way to get more details, al least telephone ?
    O where is the code that interact with the api of facebook and gmail, maybe I can add more fields .

    Thanks!

  • Craig Hamer
    Wed, 22 Mar 2017, 5:53 PM
    I am attempting to isolate users of Oauth2 that are using facebook authentification. Is there a way to find just these users?
  • Jérôme Mouneyrac
    Wed, 22 Mar 2017, 6:01 PM
    Hi Craig, yes you should be able to find this information in the plugin database table (look in db/install.xml to see the structure)
  • Craig Hamer
    Wed, 22 Mar 2017, 8:05 PM
    Would this be on the server? I am not an admin, and we are without an admin at the moment. How can I find this file?
Please login to post comments