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
458 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 Pau Ferrer Ocaña
    Wed, Jun 10, 2015, 10:34 PM
    Hi!

    We have a problem translating the module for 2.8, in AMOS we cannot see versions greater than 2.5 so the new strings are not included.

    Thanks!

    Pau
  • Picture of Jonatan martinez
    Sat, Jun 13, 2015, 6:29 AM
    Hola amigos, tengo instalado este maravilloso plugin, pero tengo un solo inconveniente con el, el problema es que cuando inician sesión en moodle abre automaticamente la sesión de gmail y demas, pero al salir de moodle deja las cuentas de gmail abiertas, hay una solución a este problema o aun no. de antemano mil gracias por su ayuda.
  • Picture of Charlotte Nicolas
    Mon, Jun 15, 2015, 8:31 PM
    Hi,

    Thanks a lot for your quick response and the links.
    I am working on french traduction of your plugin and I have another question about exeption you use in your plugin.
    Why don't you use $module parameter when you throw moodle_exception ?
    For ex : throw new moodle_exception('couldnotgetuseremail');
    Instead of throw new moodle_exception('couldnotgetuseremail','auth_googleoauth2');
    Thus, the translation is not taken into account for following error codes : unknown_oauth2_provider, couldnotgetuseremail, facebook_failure, google_failure, linkedin_failure...
    Do you plan to add this kind of modifications to the next version ?

    Thanks,
  • Picture of Jérôme Mouneyrac
    Sat, Jun 20, 2015, 11:14 AM
    Bonjour Charlotte,
    it sounds like a good improvement, can you create an issue on Github for it? I have a lot of issues to resolve on this plugin and very little free time for it, it makes it easier if I get most of the information in the github issue tracker. Especially I will likely fix this issue next time I work on the plugin as it is easy and helpful. Thanks for your report smile
    cheers,
    Jerome

    ola Jonatan,
    I am aware of this issue (people don't get log out from the provider itself), but it works like that for every sites on internet using the same authentication system. I think people just need to learn how to use this system, but if a lot of user asks for this feature then we will add some more code for it smile At least can you create an issue as I mentioned in https://github.com/mouneyrac/moodle-auth_googleoauth2/issues/109#issuecomment-113700081 (if ardok don't do it before you). It will be helpful too smile Thanks for your report too smile
    cheers,
    Jerome
  • Picture of ken collinson
    Sat, Jun 27, 2015, 9:34 PM
    Hi Jerome, I have installed the plugin, on my moodle 2.8 and we are using the 'Essential' theme, the buttons are so high up on the login page they are hidden by the theme 'top bar'. I have tried the option of disabling the 'auto' postioning disply of the buttons and have pasted the php code provided into my 'instructions' section for display on the login page, but it only shows the raw code and is not been interpretated. Can you advise please

    kind regards
    ken
  • Picture of Srikanth Kumar Manne
    Tue, Jun 30, 2015, 12:02 AM
    How to position the google/facebook buttons on the login page?

    Can any one help me in bringing the buttons to the bottom of the login page?

    Thanks


  • Picture of Jérôme Mouneyrac
    Mon, Aug 10, 2015, 1:36 PM
    Ken: try to encapsulated the code in <?php ?> (could be the issue)
    Srikanth: as Ken mentioned, use the code indicated in the settings page and place it in your login page.
    I suggest to have a look to the FAQ, the wiki, the issue tracker, all the previous comments, you may find some people having the same issue. Some may have kindly explain how they fixed their problem once they fixed it (hopefully everybody that asked questions should answer their own questions when they find out... just teasing half of the questioners smile )
  • Picture of Charlotte Nicolas
    Thu, Aug 13, 2015, 9:08 PM
    Hi Jérôme,

    Thanks for the corrections you've done.
    I'm just a little confused because I can't test it...
    In fact, we are using Moodle through proxy server.
    I configure it on moodle (it works with other plugins and an old version of your plugin) but now it doesn't work anymore with the new version of oauth2 plugin (Perhaps since the use of Guzzle/PHP League oauth2 client...).
    It seems like the Moodle configuration for proxy was not taken into account.
    Do you know where it can be configured ?

    Thanks,
  • Picture of boruh compl
    Tue, Aug 25, 2015, 12:47 AM
    Hi plugin works great but some user have error like this :
    Authentication method error.
    Please try to login again with your username and password

    do you know what is wrong ?
  • Picture of Jérôme Mouneyrac
    Wed, Aug 26, 2015, 6:42 PM
    Charlotte: can you write an issue for that in github? Thanks.
    Tomasz: at the moment user with manual authentication can not log in Moodle with the googloauth2 authentication. I'll support that later. There is an issue in github.
  • Picture of camille Grasset
    Wed, Sep 9, 2015, 8:24 PM
    Hi,
    Can I upload my users via a csv file, then ask them to register through google auth? My tests haven't worked so far...
    Thanks in advance
  • Picture of Scott Krajewski
    Thu, Sep 10, 2015, 8:33 AM
    @Camille. I have done a CSV upload with google auth. Make sure you have a column auth with a value of googleoauth2 in your CSV.
  • Picture of Pablo Felip
    Thu, Sep 10, 2015, 4:22 PM
    Hi,

    Great plugin, thanks!

    I am currently facing a problem where Chrome and / or Firefox block the Google login button provided by this plugin when doing https authentication in Moodle.

    Firefox shows a warning saying that the page contains mixed context (https + http) and offers the possibility to show it, but Chrome, in its default configuration, simply blocks it with no obvious means of bypassing the default behaviour. The button simply does not appear.

    Any idea?

    Thanks in advance
  • Picture of Charlotte Nicolas
    Thu, Sep 10, 2015, 10:49 PM
    Hi Jérôme,

    In fact I think Guzzle doesn't take http proxy into account.
    So we add HTTP proxy parameters in PHP-FPM configuration and it works.
    Perhaps it's not necessary to create an issue...

    Regards,

    Charlotte
  • Picture of Srikanth Kumar Manne
    Tue, Sep 15, 2015, 2:00 PM
    Hi

    Please help us, we are facing a problem while signing in using browsers from mobile.

    error/couldnotgetuseremail

    moodle version: 2.7.1+ (Build: 20140905)
    Oauth2: 2015051501 1.5 (Build: 2015051501)
Please login to post comments