Authentication: Google / Github / Linkedin / DropBox / Windows / VK / Battle.net authentication

auth_googleoauth2
Maintained by Picture of Jérôme Mouneyrac Jérôme Mouneyrac
Sign-in with your Google / Github / Linkedin / Windows Live / VK / Battle.net account. The first time you sign-in, a new account is created.
2322 sites
2k downloads
226 fans

Warning for Facebook users: I have been alerted that the current install of this plugin will stop working with Facebook API 2.2 the 27 March (it was already not working for the facebook API 2.8 and later). Unhappily I do not foresee any fix to this issue. However I will be happy to merge a pull request.

No new versions are planned 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 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 publish in Moodle.org plugin repository. There will probably be a new Oauth2 categories in the Moodle plugin repository. wait and see...

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.

Facebook not working anymore

Facebook changed the API in its 2.8 version and it is not compatible with the plugin. Moreover the plugin is compatible with the old Facebook API 2.2 which is ending the 27th of March 2017. So it is likely that the Facebook login will stop to work at this date. In the comments you will find a script to put in your root folder to detect who is using facebook and so you can alter your users.

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 Jérôme Mouneyrac
Jérôme Mouneyrac (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of 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."
  • Picture of 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).
  • Picture of 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
  • Picture of 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
  • Picture of 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?
  • Picture of 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!

  • Picture of 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?
  • Picture of 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)
  • Picture of 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?
  • Picture of Jérôme Mouneyrac
    Thu, 23 Mar 2017, 8:58 AM
    Hi Craig, unfortunately only someone with a minimum of administration experience can access the information about who use what. Maybe your administrator installed something like phpmyadmin which allows you to access the database table from a web interface (but if you don't not what you are doing you probably want to stay away from touching the DB). In any case you want to have a look at the tables mentioned in https://github.com/mouneyrac/moodle-auth_googleoauth2/blob/master/db/install.xml

  • Picture of Jérôme Mouneyrac
    Thu, 23 Mar 2017, 9:08 AM
    in my last comment " In any case" should be read "would you go this way".
  • Picture of Craig Hamer
    Thu, 23 Mar 2017, 4:09 PM
    Are you available to work on this if I give you access and what would that cost? craig@growdly.com is my email.
  • Picture of Jérôme Mouneyrac
    Sat, 25 Mar 2017, 10:29 AM
    Hi guys

    I did try to fix the Facebook issue again, trying to upgrade the phpleague lib to a more recent version (without even trying the last phpleague 2.X version, just the last 1.X version so refactoring would be minimum) but it would still mean rechecking all providers and likely doing some refactoring. I don't have the time for that right now, sorry sad

    However I created a quick script to know who is using Facebook and so you can alert your users. You need to put the code in a .php file in your Moodle root folder and access it from your browser (of course delete the file once you ran it and so know who is using facebook to login).

    require_once('config.php');
    $facebook_users = array();
    $facebook_logins = $DB->get_records('auth_googleoauth2_logins', array('subtype' => 'facebook'));
    foreach($facebook_logins as $facebook_login) {
    if (empty($facebook_users[$facebook_login->userid])) {
    $facebook_users[$facebook_login->userid] =
    $DB->get_record('user', array('id' => $facebook_login->userid), 'id, username, email, firstname, lastname, lastlogin');
    $facebook_users[$facebook_login->userid]->lastlogindate = date('Y-m-d H:i:s', $facebook_users[$facebook_login->userid]->lastlogin);
    }

    }
    echo count($facebook_users) . " googleoauth2 facebook user(s)";
    echo "
    ";
    print_r($facebook_users);
    echo "
    ";
  • Picture of Jérôme Mouneyrac
    Sat, 25 Mar 2017, 10:31 AM
    the above script works but inside the echo " "; was meant to be echo " < pre >"; and echo " < /pre > " without the whitespace in the " "
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Please login to post comments