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.
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
facebook login not work
google+ is very well
how can i solve facebook login ?
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.
The domain specific login page is due to be depreciated soon, I don't know if this method will be affected.
Again ... thanks for your work. 'spirit of sharing', Ken
The authentication provider sent us a communication error. Please try to sign-in again.
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 nullUPDATE 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
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
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.
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.
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?
FIXED
What could be wrong?
Ref: www.wegversity.com/courseware