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
110 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
I (as I'm sure a few others do) have an installation that forces people go to the log in screen, no guest access, and I do NOT want to disrupt the theme, instead I want to place it inside the "Login Box"
I had to make an edit to
MOODLEROOT/login/index_form.html (php still works here by the way)
Just above the "form" line I pasted the associated PHP code.
If anyone else makes this modification be fully aware that a moodle update can (and likely will) change this file in the future. Make sure you keep that in mind.
For those who wish to see this in effect (with Google)
Side note: I am on Moodle 3.1+ (this plugin works with it, thanks again). And I'm using build of this plugin 1.2.4
switch ( $authprovider ) {
case 'facebook':
$queryparams['access_token'] = $access_token;
// >>> @ Shaposhnikov D.
$queryparams['fields'] = 'id,email,first_name,last_name,verified';
// <<<
$curl_response = $curl->get( $request_api_url . '?' . $this->_generate_query_data( $queryparams ) );
$curl_final_data = json_decode($curl_response, true);
if ( isset( $image_header['Content-Type'] )
&& is_string( $image_header['Content-Type'] )
&& in_array( $image_header['Content-Type'], array_keys( self::$_allowed_icons_types ) ) ) {
$mime = $image_header['Content-Type'];
} else {
// >>> @ Shaposhnikov D.
foreach( $image_header['Content-Type'] as $ct ) {
if ( isset( $ct )
&& is_string( $ct )
&& in_array( $ct, array_keys( self::$_allowed_icons_types ) ) ) {
$mime = $ct;
break;
}
}
// <<<
}
$ext = $this->_lenauth_get_image_extension_from_mime( $mime );
if ( $ext ) {
//create temp file
The icons are not showing in our moodle login page. We are using moodle 3.1.1. I tried pasting the code as you instructed some users, but it only makes the message on "create a new account" side disappear and no icons are showing. Any suggestions?
auth_lenauth/Your social account is not verified.
My issue was resolved as per Dmitry Shaposhnikov's comments by adding $queryparams['fields'] = 'id,email,first_name,last_name,verified';
Thankyou Igor for the plugin and Dmitry for the fix.