Oauth2 authentication plugin for Moodle (for Moodle 3.2 and earlier) icon

Oauth2 authentication plugin for Moodle (for Moodle 3.2 and earlier)

Maintained by Sergio Rabellino
Sign-in with an Oauth2 provider. The first time you sign-in, a new account is created.
Price option: Free

Supports Moodle 2.1-3.2 See all versions
Latest release: 7 years ago
Installations: 416
Downloads (last 90 days): 43

Frankenstyle name: auth_googleoauth2
Authentication
OAuth2

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

I try Oauth2 with Moodle 2.6
facebook login not work
google+ is very well
how can i solve facebook login ?
In the instructions I think it says to edit /login/index.php
There is now a theme which shows how to add the buttons to an existing login page. In that theme it would be /layout/login.php where you add had=domain.com
Let me know if you get stuck.
@Graham. Thanks. Pardon my denseness, but what file do I edit to add the hd=domain.com parameter to the google login URL? Thanks, in advance, Ken
@Ken Task, it works exactly the same for Google Apps for Education/Business accounts. We combined our system with Moodle's ability to restrict the email address to specified domains. One tip is to add hd=domain.com as a parameter in the google login URL. This saves typing in the whole email address when logging in. See an example at http://ssa-vle.org.uk
The domain specific login page is due to be depreciated soon, I don't know if this method will be affected.
Great plugin! Thanks. Works for individual G accounts, but will it work with schools that have 'gone Google' ... ie, have a Google domain for the school? Is there some admin setting where that could be added/changed in the Moodle Admin UI? Also, if one logs out of Moodle, does it also logout of Google?
Again ... thanks for your work. 'spirit of sharing', Ken
Hi I am installed auth googleoauth2 plugin, but facing the problem following error is:
The authentication provider sent us a communication error. Please try to sign-in again.
I'll report isses to github if needed, but I'm not sure if these are bug issues, or configuration issues on my end.
I'm running Moodle 2.5.3+ (Build: 20131115)
I've just installed the plugin. I am able to login with Facebook and Google.
For LinkedIn I'm getting "Error writing to database". Here's the anonymized debug info:
Debug info: Column 'country' cannot be null
UPDATE mdl_user SET email = ?,firstname = ?,lastname = ?,country = ?,city = ? WHERE id=?
[array (
0 => 'linkedinuser@domain.com',
1 => 'First',
2 => 'Last',
3 => NULL,
4 => NULL,
5 => '17',
)]
Error code: dmlwriteexception
Stack trace:
line 426 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 1195 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1227 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
line 371 of /auth/googleoauth2/auth.php: call to mysqli_native_moodle_database->update_record()
line 88 of /login/index.php: call to auth_plugin_googleoauth2->loginpage_hook()
Output buffer: Notice: Undefined property: stdClass::$country in /var/www/vhosts/mysite.com/httpdocs/auth/googleoauth2/auth.php on line 326 Notice: Trying to get property of non-object in /var/www/vhosts/mysite.com/httpdocs/auth/googleoauth2/auth.php on line 326 Notice: Undefined property: stdClass::$name in /var/www/vhosts/mysite.com/httpdocs/auth/googleoauth2/auth.php on line 327

My LinkedIn First, Last, and email address were in the debug info.
Any advice would be appreciated.
Thanks,
Darrel
Just a reminder, if possible do not report issues here but on the github: https://github.com/mouneyrac/moodle-auth_googleoauth2/issues?state=open
Also when reporting issue don't hesitate to turn debug mode ON in moodle, and give the full error message. Also mention your environment it can help to resolve an issue.
On github there is also a wiki/faq: https://github.com/mouneyrac/moodle-auth_googleoauth2/wiki
Thanks smile
I tried with the last 2.5 stable version, it works fine for me.
This plugin not work in my Moodle 2.5.2+
I research problem and find, what there is error in /auth/googleauth2/auth.php
In line 359 used authenticate_user_login function, that dont work with empty second parameter (password).
Replace
$user = authenticate_user_login($username, null);
-->
$user = get_complete_user_data('username', $username, $CFG->mnet_localhost_id);
or $DB-> get_record function
solve this problem.
Hi Toshendra and Vivek,
about the 500 Internal error, please write an issue in the github tracker issue. We can follow up from there. Don't forget to provide the exact step to reproduce and to mention your environment.
About the plugin not working in local, you can use service like http://progrium.com/localtunnel/ to give online access to a local server.
Hi Jeremy,
I'm just looking around to try out the oauth authentication method, to possibly try and extend it. Is there any way that I could get this working on local?
Saying something Dangerously writable: [/home3/tos*****/public_html/wegversity/courseware/auth/googleoauth2/facebook_redirect.php]
FIXED
What could be wrong?
Getting 500 Internal Server Error while returning back from Facebook, Git & Gmail.
Ref: www.wegversity.com/courseware