Skip to content

StudiUM/moodle-auth_googleoauth2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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

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 /classes/provider/newprovidername.php and newprovidername_redirect.php. Then add the lang strings in /lang/en/auth_googleoauth2.php and add the provider name to lib.php:provider_list (if you have time you can change the function logic to automatically load the classes from the provider folder and then send me a pull request, thanks :))

Use the table access token (for devs)

In order to store the user access tokens, you must set the config with: set_config('saveaccesstoken', 1, 'auth/googleoauth2');

Then you can use them in your own plugin. The Oauth2 plugin also trigger an event on login. You can retrieve the access token from it too.

Composer (for devs)

The plugin includes the 'vendor' folder (so don't need to run composer).

If you do any change related to composer, here is what need to be done:

  1. Install composer.phar: curl -sS https://getcomposer.org/installer | php
  2. Install the 'vendor' folder: php composer.phar install
  3. apply the changes listed in VENDOR CHANGES.md

PS: if you need to know more about composer, you can read Composer Namespaces in 5 Minutes

Continueous integration, tracker...

Build Status Stories in Ready Codacy Badge bountysource

Throughput Graph

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.

About

Google - Facebook - Windows - etc. authentication plugin for Moodle.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 94.6%
  • CSS 3.2%
  • JavaScript 1.1%
  • Gherkin 1.1%