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)

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2

Contributors

Igor Sazonov (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • abdoul kassoum Thimobiano Yendanl
    Thu, 7 Jan 2016, 6:17 AM
    Hi as i new user of moodle i'd really like to use your plugin but, my English make it hard for me to setup it quickly and well. so now if someone can help even with a guide or a vdeo it will be helpfull thanks is advance.
  • Igor Sazonov
    Thu, 7 Jan 2016, 3:53 PM
  • Joseph Conradt
    Sat, 2 Apr 2016, 1:33 PM
    Hi Igor. I have verified my Facebook developer account by phone, but I am receiving this error when trying to login with Facebook: auth_lenauth/Your social account is not verified. Any ideas?
  • Igor Sazonov
    Sat, 2 Apr 2016, 10:47 PM
    Hi, Joseph! This is a native Facebook response error, your Facebook account is not verified. Look at possible errors table here http://lms-service.org/lenauth-plugin-oauth-moodle/#lenauth-errors
  • Lane Babuder
    Fri, 10 June 2016, 4:38 AM
    Thank you for your wonderful plugin, I had to do some manual digging because your installation guide did not follow my specific instance.

    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
  • Igor Sazonov
    Fri, 10 June 2016, 4:52 AM
    Hi, Lane! Thanks for good words about the plugin! Yes, you right about the index_form.html code, also yo can paste static HTML code at login page instructions field: Site Administration -> Plugins -> Authentication -> Manage authentication scroll down to Instructions field, turn HTML-code mode and paste static HTML-code there, save settings)
  • Dmitry Shaposhnikov
    Thu, 14 July 2016, 10:47 PM
    There is a bug with Facebook. You need to add this code in auth.php:775 :

    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);


  • Dmitry Shaposhnikov
    Thu, 14 July 2016, 11:08 PM
    Another bug is with Yandex avatars. You need to fix some rows in auth.php:

    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
  • Igor Sazonov
    Sat, 16 July 2016, 3:08 AM
    Dmitry, about fields in Facebook, maybe you mean Javascript SDK? at server OAuth all nice, read: https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/v2.0#checktoken
  • Igor Sazonov
    Sat, 16 July 2016, 3:17 AM
    Dmitry, image get_headers contains mime at the first array item, but this is good idea, i will push it with your copyrights
  • Ziyad Muslat
    Wed, 24 Aug 2016, 3:45 AM
    Hi Igor,
    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?
  • Ziyad Muslat
    Wed, 24 Aug 2016, 4:40 AM
    I think, I solved the issue by pasting the static html code into the index_form.html file. However, I have one more question; would you be adding Linkedin log in button any time in the near future
  • Igor Sazonov
    Wed, 24 Aug 2016, 4:45 AM
    Ziyad, Im glad to hear about all is ok. Yes, i have a plan to integrate LinkedIn. If you will like (add to favorites) the plugin at this page - it will be great)) i wish you all good!
  • Ziyad Muslat
    Wed, 24 Aug 2016, 10:15 PM
    Thanks Igor. I already did add the plugin to my favorites
  • Brendan Wright
    Tue, 1 Nov 2016, 4:09 PM
    I had the same issue with facebook as a number of other people. My Facebook account is verified but I was receiving the following error when trying to login with Facebook:
    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.
Please login to post comments