Moodle plugins directory: LenAuth | Moodle.org
LenAuth
Authentication ::: auth_lenauth
Maintained by Igor Sazonov
LenAuth is a plugin for easy OAuth authorize methods via social networks: Facebook, Google, Yahoo, Twitter, VK, Yandex, Mail.Ru. Easy integrate methods to Moodle theme and a lot of settings.
Latest release:
100 sites
109 downloads
37 fans
Current versions available: 1
Just some steps to make easy authorize method: Configure social networks OAuth applications, setup plugin settings, select buttons skin, integrate code to your current Moodle theme.
Installation
1. upload plugin to /auth/lenauth
2, update Moodle with this new plugin
3. activate the plugin at Site administration -> Plugins -> Authentication -> Manage authentication
Plugin docs at Russian language (English docs link at "Useful links" block)
Contributors
Igor Sazonov (Lead maintainer)
Please login to view contributors details and/or to contact them
It's evident your coding style is slightly different from the official Moodle one in some syntax details. Yet your style is consistent and the code is well structured and easy to follow - so it's not a problem.
One thing I spotted during the code review is MySQL specific syntax in $DB->get_record_sql() query - single quotes wrapping the field names. Please make sure your plugin works with at least PostgreSQL, too (as these two are most commonly used DB systems Moodle sites run on). Also, please check the Moodle dev documentation for `$DB->sql_like()` that should be probably used in your case.
Also note, when using set_config() and get_config() for the particular plugin, I believe the correct syntax is to use https://docs.moodle.org/dev/Frankenstyle for the full component (plugin) name. I know that some old auth plugins out there violate this but it became pretty standard convention.
The code throws `Notice: Undefined property` at couple of places in out.php file. Please make sure to have development debugging on during development.
Please note that the file view_admin_config.php does not seem to perform any security/access control related checks. Even if it currently relies on being included by the `config_form()` method only, it might make sense to perform some extra protection to make sure it does not reveal sensitive configuration data.
For now, I am going to mark this plugin as needing more work until we get these issues resolved. Thanks for your patience with the review and approval process.
I still experience these annoying PHP notices when trying to configure the plugin: https://gist.github.com/mudrd8mz/d99a33ce1a445e29b8c2 Can you look at those yet please?
I am happy to go and approve this plugin now. Good luck with further development and maintenance of it. You are cleared to land, welcome to the Plugins directory!
It's great to have a new social media login plugin. And I think providing the HTML / PHP code for adding the buttons is great.
I have just installed and tried this using the Facebook and Google login options on my Moodle site and both work fine using Moodle version 2.8. For Google I had to enable the Google+ api for it to work using
Api's & Auths -> APIs
Search for Google plus
Enable it.
It would be cool to get the user's picture from Facebook/Google/Twitter into the Moodle user profile to
Thanks for sharing your awesome plugin!
Thanks for good words!
Yes, i need to add to documentation to enable Google+ API in developer console.
Good idea about avatar, but not all socials returns this data, for example, Twitter provides only social id and username, so user need to complete his profile...
PS: Yahoo and Twitter was much difficult about developing this plugin, because they has very difficult OAuth rules..
So enjoy the plugin, be sure it has been tested much to be right working. Thanks again, have a good day!