Your Moodle version

Authentication: Google / Facebook / Github / Linkedin / DropBox / Windows / VK / authentication

Maintained by Picture of Jérôme Mouneyrac Jérôme Mouneyrac
Sign-in with your Google / Facebook / Github / Linkedin / Windows Live / VK / account. The first time you sign-in, a new account is created.

This plugin adds the "Sign-in with Google / Facebook / Github / Linkedin / Windows Live  / VK /" buttons on the login page. The first time a user login,  a new Moodle account is created.


  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.

Documentation and support

Visit the Github web page.

You can also 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.

Motivate the maintainer, +1 the plugin

Like the plugin on (the Add to my Favorites link on this page) and check who contributed to the plugin development in the landing page. Thanks guys!

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
Screenshot #1
Screenshot #2


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
  • Campamento de robotica educativa
    Sat, Nov 7, 2015, 12:10 AM
    Hola nuevamente,tengo este error
    Tu dirección de correo electrónico no ha sido verificado por el método de autentificación que has seleccionado. Puede ser que te hayas olvidado de hacer click en el enlace "verificar dirección de correo" que Google o Facebook debía haberte mandado durante la subscripción a su servicio.

    Más información sobre este error, es cuando quiero auntenticarme con facebook, pero con google funciona perfect
    Debug info:
    Error code: emailaddressmustbeverified
    Stack trace:

    line 258 of /auth/googleoauth2/auth.php: moodle_exception thrown
    line 89 of /login/index.php: call to auth_plugin_googleoauth2->loginpage_hook()
  • Picture of Denis Belaev
    Sat, Nov 7, 2015, 8:10 PM
    Hello, thank you for good plugin! Is it possible to show plugin block not only on login page login/index.php, but on all pages of the web site? If yes, where in the code should I switch it on? Thank you very much!
  • Picture of phuong hoang
    Tue, Nov 10, 2015, 12:26 AM
    Hi Jérôme,
    I installed your plugin and it works like a charm. However, I wonder why my login buttons; Google and facebook... don't look like your demo. I missed something? How can I get like yours? Many thanks in advance.
  • Picture of Jérôme Mouneyrac
    Tue, Nov 10, 2015, 12:09 PM
    Phuong: did you download the 2.2 version (for Moodle 2.7 and higher)? Only this version has the new design/improvements. I do not backport anymore changes to 2.6 as it is not maintained anymore by Moodle HQ.
  • Picture of Jérôme Mouneyrac
    Tue, Nov 10, 2015, 12:12 PM
    Denis: you need to create a simple block and insert the php code mentioned in the setting page. Note that you don't want to display this block on the login page if the login page already contain the oauth2 buttons. At the current state the plugin doesn't support to have twice the Google/Facebook... oauth2 buttons. Only the last instances of the oauth2 buttons will work (it is unlikely you do that but I just mention it so you are aware).
  • Picture of phuong hoang
    Tue, Nov 10, 2015, 11:28 PM
    Jérôme: I'm using version 2.1 (for Moodle 2.7 and higher), I'll update. Thanks
  • Picture of Daniel Tillman
    Fri, Nov 13, 2015, 10:57 AM
    I love this plugin and it generally works well. However, my students, all using Safari on iPads get the following error on occasion and I have no clue why. "exception - Error fetching Oauth2 access token, message: "invalid_client"

    Can you shed a little light onto this for me?

    I am using Moodle 2.9.2+ and the newest version of the plugin Release 2.2 (Build: 2015110600)
  • Picture of Jérôme Mouneyrac
    Tue, Nov 17, 2015, 5:03 PM
    Daniel: this is interesting, I was not aware of it not working on iPad. Can you write on issue on github. Could you put a video of it too. I'll test it on my old broken ipad2 smile thanks.
  • Picture of Daniel Tillman
    Thu, Nov 19, 2015, 10:39 PM
    I am trying to get a screenshot of this error, but cannot reproduce it, it is an occasional error, but crippling if the teacher wants to give a quiz in moodle and 1 or 2 students can't log in. It could be something on Google's end, or an issue with the server itself rather than an error with the plugin.

    The plugin generally works just fine on iPads as well as on the Mac's we have here at school. Sometimes the error pops up at the initial login to the site, sometimes it pops up when trying to get access to their google drive to upload a file to moodle. I have seen it on several students' ipads, but it appears totally at random. We have 1200+ iPads on campus and have personally only seen it only a few times but I have heard from teachers about it happening a few other times.
  • Picture of Daniel Tillman
    Thu, Nov 19, 2015, 11:25 PM
    I finally got a screenshot of the error from a student. I have posted it to GitHub.
  • Campamento de robotica educativa
    Sat, Nov 21, 2015, 3:14 AM
    Estoy tratando de hacer un link (button) con otra web para login con google a mis course de moodle, pero me dà este error
    Error code: Invalid state parameter
  • Campamento de robotica educativa
    Sat, Nov 21, 2015, 3:16 AM
    Como puedo obtener ese 'state' parameter..trato de hacerlo con esto,
    pero no consigo <?php

    global $USER, $SESSION;

    $SESSION->sesskey = $USER->sesskey;
    ?><?php echo sha1($USER->sesskey);?>
  • Picture of Scott Adamson
    Tue, Nov 24, 2015, 12:10 AM
    Using this tool, can we limit the account creation to JUST a login from our Google Apps accounts (limit and not open to the public).
    Thank you
  • Picture of Daniel Tillman
    Tue, Nov 24, 2015, 1:02 AM
    Scott, you can set it up that way. Under the Site Admin menu, go to Plugins -> Authentication -> Manage Authentication. Here is the important part -> SCROLL DOWN until you find Allowed email domains. Enter your Google Apps domains there. (I always forget that there are more options when you scroll down on that page.)
  • Picture of Renaat Debleu
    Wed, Nov 25, 2015, 6:55 PM
    Even when the plugin is not enabled, the authentication method writes log entries with no respect for the debugging settings:
    error_log(print_r($event, true));
    error_log(print_r($event->userid, true));
    This should be documented in the readme file.
1 2 3 4 5 6 7 8 9 10 11 12 13
Please login to post comments