Authentication: LenAuth

auth_lenauth
Maintained by Picture of Igor Sazonov 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.
190 sites
261 downloads
19 fans
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

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

Comments RSS

Show comments
  • Picture of Dmitry Shaposhnikov
    Thu, 14 Jul 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
  • Picture of Igor Sazonov
    Sat, 16 Jul 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
  • Picture of Igor Sazonov
    Sat, 16 Jul 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
  • Picture of 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?
  • Picture of 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
  • Picture of 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!
  • Picture of Ziyad Muslat
    Wed, 24 Aug 2016, 10:15 PM
    Thanks Igor. I already did add the plugin to my favorites
  • Picture of 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.
  • Picture of Vassilis K
    Thu, 9 Feb 2017, 6:02 AM
    I tried to make this plugin work, again after some weeks. I am confused. First of all, I cannot find anything in the documentation about what I should put at "Valid OAuth redirect URIs" that facebook app asks. The first time I tried the plugin I think I had found the URL somewhere. Anyway, it didn't work then, and now it doesn't work giving the message "Empty Social UID". Please help...
  • Picture of Charan Sri
    Thu, 9 Feb 2017, 1:58 PM
    I am getting the error "auth_lenauth/Empty Social UID". Please help me
  • Picture of Dmitriy Gorodkov
    Wed, 1 Mar 2017, 3:55 PM
    не показывает статический html код! версия moodle 3.2 может из за этого, но скорее всего это просто ваш баг.
  • Picture of Igor Sazonov
    Wed, 1 Mar 2017, 3:58 PM
    Vassilis K, Charan Sri, Dmitriy Gorodkov thanks for issues. I will do all work at this weekend.
  • Picture of Emanuele Aloi
    Thu, 2 Mar 2017, 12:18 AM
    Hello Igor,

    For an Academic Research, I'm trying to find a way to ask users permission to view their "facebook likes". Until now it seemed to understand that it must necessarily use Graph API.
    This plugin could help me in any way?

    thank you,
    Ema
  • Picture of Tâm Nguyễn
    Sat, 18 Mar 2017, 12:21 AM
    Hello Igor
    My Moodle version is 3.2.2+ (Build: 20170316). I got these errors when I created static HTML code:
    Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result
    line 490 of /lib/pagelib.php: call to debugging()
    line 817 of /lib/pagelib.php: call to moodle_page->magic_get_context()
    line 1435 of /lib/weblib.php: call to moodle_page->__get()
    line 9 of /auth/lenauth/htmlcode.php: call to format_string()

    ( ! ) Warning: get_called_class() called from outside a class in /var/www/html/home/auth/lenauth/out.php on line 8
    Call Stack
    # Time Memory Function Location
    1 0.0014 368120 {main}egg .../htmlcode.php:0
    2 0.0403 2587552 include_once( '/var/www/html/home/auth/lenauth/out.php' ) .../htmlcode.php:12
    3 0.0404 2587552 get_called_class egg .../out.php:8

    I don't know how to fix it. Please help me. Thanks so much.
  • Picture of Tâm Nguyễn
    Sat, 18 Mar 2017, 12:25 AM
    Errors when I clicked on Facebook Icon on my website:
    ( ! ) Notice: Undefined index: id in /var/www/html/home/auth/lenauth/auth.php on line 779
    Call Stack
    # Time Memory Function Location
    1 0.0037 369448 {main}egg .../index.php:0
    2 0.0320 2309216 auth_plugin_lenauth->loginpage_hookegg .../index.php:90

    ( ! ) Notice: Undefined index: email in /var/www/html/home/auth/lenauth/auth.php on line 780
    Call Stack
    # Time Memory Function Location
    1 0.0037 369448 {main}egg .../index.php:0
    2 0.0320 2309216 auth_plugin_lenauth->loginpage_hookegg .../index.php:90

    ( ! ) Notice: Undefined index: first_name in /var/www/html/home/auth/lenauth/auth.php on line 781
    Call Stack
    # Time Memory Function Location
    1 0.0037 369448 {main}egg .../index.php:0
    2 0.0320 2309216 auth_plugin_lenauth->loginpage_hookegg .../index.php:90

    ( ! ) Notice: Undefined index: last_name in /var/www/html/home/auth/lenauth/auth.php on line 782
    Call Stack
    # Time Memory Function Location
    1 0.0037 369448 {main}egg .../index.php:0
    2 0.0320 2309216 auth_plugin_lenauth->loginpage_hookegg .../index.php:90
1 2 3 4
Please login to post comments