Maintained by Picture of Sergio RabellinoSergio Rabellino
Sign-in with an Oauth2 provider. The first time you sign-in, a new account is created.

Oauth2 authentication plugin for Moodle (for Moodle 3.2 and earlier) 3.1 (Build: 2019020501)

Release notes

Warning for Moodle 3.3 and later: starting from Moodle 3.3, Oauth2 should be implemented in core. I suppose it likely will be a system that requires creation of individual plugins for each authentication providers. I won't be supporting this plugin starting the release of Oauth2 implementation in Moodle, so starting 3.3 (https://docs.moodle.org/dev/Better_Office_Integrations_3.3#Core_API_for_managing_Authorized_OAuth_Applications) I recommend to use new plugins using this new Moodle core system. They are likely to quickly be implemented by someone else and publish in Moodle.org plugin repository. There will probably be a new Oauth2 categories in the Moodle plugin repository.

-

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

Note: This is a complete rewriting of the old plugin and is now compatible with the Google+ API shutdown.

Requirements

PHP 5.5

Installation:

  1. add the plugin into /auth/googleoauth2/
  2. run the Moodle upgrade
  3. in the Moodle administration, enable the plugin (Admin block > Plugins > Authentication)
  4. in the plugin settings, follow the displayed instructions. or just install the plugin from Moodle.org repository plugin page

If you have any issues you can follow the Git chapter of my free mini-course how to install a Moodle plugin. It is using the Oauth2 plugin as example.

Implement your own provider (for devs)

  1. add your third party provider for Oauth2 client as explain in https://github.com/thephpleague/oauth2-client
  2. create [PLUGIN_HOME]/classes/provider/newprovidername.php and [PLUGIN_HOME]/newprovidername_redirect.php. Then add the lang strings in /lang/en/auth_googleoauth2.php.

Composer (for devs)

The plugin does not include the 'vendor' folder as explained by composer best practice. If you need to know more about composer, you can read Composer Namespaces in 5 Minutes

Continuous integration, tracker...

Build Status Codacy Badge bountysource

Credits

+1 the plugin

To like the plugin, go to the Moodle.org repository plugin page, login and click on 'Add to my Favorites'. Find other ways to contribute on the github plugin page.

Moodle 2.7, 2.8, 2.9, 3.0, 3.1, 3.2

Version information

Version build number
2019020501
Version release name
3.1 (Build: 2019020501)
Maturity
Stable version
MD5 Sum
cafd1ca97a79cfa68047475c34bf5bf4
Supported software
Moodle 2.7, Moodle 2.8, Moodle 2.9, Moodle 3.0, Moodle 3.1, Moodle 3.2
  • This is the latest release for Moodle 2.7
  • This is the latest release for Moodle 2.8
  • This is the latest release for Moodle 2.9
  • This is the latest release for Moodle 3.0
  • This is the latest release for Moodle 3.1
  • This is the latest release for Moodle 3.2

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS branch
master

Default installation instructions for plugins of the type Authentication

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder (eg "myauth") in the "auth" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation