Giter Site home page Giter Site logo

sk-unikent / moodle-auth_googleoauth2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rabser/moodle-auth_googleoauth2

0.0 2.0 0.0 2.49 MB

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

Home Page: http://googleoauth2.mouneyrac.com

License: GNU General Public License v3.0

PHP 95.51% JavaScript 1.02% CSS 2.47% Gherkin 1.00%

moodle-auth_googleoauth2's Introduction

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.

Requirements

PHP 5.5

Installation:

  1. add the plugin into /auth/googleoauth2/
  2. Install composer.phar: curl -sS https://getcomposer.org/installer | php
  3. Install the 'vendor' folder: php composer.phar install
  4. apply the changes listed in VENDOR CHANGES.md
  5. run the Moodle upgrade
  6. in the Moodle administration, enable the plugin (Admin block > Plugins > Authentication)
  7. 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 /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 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

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.

moodle-auth_googleoauth2's People

Contributors

ardanzap avatar avindra avatar crazyserver avatar dasistwas avatar dmatora avatar hanleym avatar jamesmcq avatar kevin-bruton avatar kmiksi avatar leblangi avatar mouneyrac avatar netdreamer avatar rajivnavada avatar roginvs avatar rrusso avatar silviabastos avatar sk-unikent avatar vitalyrepin avatar waffle-iron avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.