Jump to content

Sign in through Steam - IPB3


Lavo
 Share

Recommended Posts


I keep receiving this error



Do you have any idea? (I tried to cmod everything 0755 already but it didn't help)




After a lot of searching on this very issue, I got it to work. The issue is that my hosting provider's apache server has mod_security configured to block URLs in querystrings. All I did was ask them to whitelist my domains, and it stopped giving me the 403.
Link to comment
Share on other sites

  • 1 month later...

After a lot of searching on this very issue, I got it to work. The issue is that my hosting provider's apache server has mod_security configured to block URLs in querystrings. All I did was ask them to whitelist my domains, and it stopped giving me the 403.


Great News, I'm really sorry I couldn't get back to you earlier. For what ever reason I wasn't followed to this post which I usually am.

Also for those of you who see this do you have any feature requests you would like to see included?

Link to comment
Share on other sites

First of all I would like to thank you for making such an awesome plugin that indeed is very useful for my members. The Installation went smoothly.

My only problem is how can I add an image to my mobile steam login?

Looks very weird when you look at it in the mobile view. Hopefully someone can help me with this problem.

Thanks in advance.

post-373450-0-36366700-1350714211_thumb.

Link to comment
Share on other sites

First of all I would like to thank you for making such an awesome plugin that indeed is very useful for my members. The Installation went smoothly.

My only problem is how can I add an image to my mobile steam login?

Looks very weird when you look at it in the mobile view. Hopefully someone can help me with this problem.

Thanks in advance.

attachicon.gifsteam.png

Thats going to require on of the hook files to be edited.

I'll have a look into it soon.

Link to comment
Share on other sites

  • 2 weeks later...

Nice work Lavoaster,

quick one hopefully, ive installed the plugin and i can find it in my ACP and enable it.. for some reason its not showing up on my site..is there any additional information i need to add to the "Edit Log In Method Steam" im running latest version of Ip.Board

thanks in advance

Link to comment
Share on other sites

Nice work Lavoaster,

quick one hopefully, ive installed the plugin and i can find it in my ACP and enable it.. for some reason its not showing up on my site..is there any additional information i need to add to the "Edit Log In Method Steam" im running latest version of Ip.Board

thanks in advance

Did you install the hook that came with it?

Link to comment
Share on other sites

  • 1 month later...

thanks for this plugin.. i also linked my steam to my forum from profile settings but when i press to icon to login is redirect to other page of steam just sends me on classic page of login i have ipb 3.4

anyone know how i can fix this?

Edit: fixed the problem was the captcha protection

Link to comment
Share on other sites

thanks for this plugin.. i also linked my steam to my forum from profile settings but when i press to icon to login is redirect to other page of steam just sends me on classic page of login i have ipb 3.4

anyone know how i can fix this?

Did you enable the login method in the ACP?

Link to comment
Share on other sites

  • 2 weeks later...

I am getting the An extension required to process this request is missing. Please notify the administrator. again.

this is after a new user (who does NOT have a steam acct linked) validates then tried to sign in (NOT using the popup but the main page) even when NOT using steam

I will uninstall and reinstall again to make sure.

edit: I pos6ted this more as a reminder to myself to test it also as well as reporting in case you had any ideas right up front.

Link to comment
Share on other sites

I am getting the An extension required to process this request is missing. Please notify the administrator. again.

this is after a new user (who does NOT have a steam acct linked) validates then tried to sign in (NOT using the popup but the main page) even when NOT using steam

I will uninstall and reinstall again to make sure.

edit: I pos6ted this more as a reminder to myself to test it also as well as reporting in case you had any ideas right up front.

I haven't a clue why it would say an extension is missing. The login never returns a mission extension error code.

Link to comment
Share on other sites

I have not had a chance to reupload, so I have no idea why its happening.

disabling this method fixed the error but I need to find out why.

It was fine prior to 3.4.x updates though.

disabling mod_security (I can do that in seconds using CSF plugin) did not make any difference either but thats not a definitive test to rule out mod_securiity really, just a fast test.

I hope to have some time to test this further tomorrow though, just wanted to note it down so if I find the issue others may benefit.

Link to comment
Share on other sites

  • 4 weeks later...

Hello Lavoster,

Firstly awesome plugin, but I'm having a slight issue.

All my new members are being automatically sent to the Banned Member Group when Signing in through Steam.

Any ideas?

Thanks in advance.

Uh... No I do not have any ideas. That would have to be something set in IPB Settings as this plugin doesn't manage who goes in to what group. It could be that the members joining were detected by the ips spam service and automatically marked as spammers.

Link to comment
Share on other sites

  • 5 weeks later...

Thanks for creating this plugin! Great work. I posted this in the review thread, but I realize it's probably better suited here. Here's my modified auth.php which fetches the user's name (and pre-populates it) and avatar from steam community when they first sign-in.

<?php
    /**
     * @author Adam Lavin (Lavoaster)
     * @copyright 2012
     * @license http://opensource.org/licenses/mit-license.php The MIT License
     */
    if ( ! defined( 'IN_IPB' ) )
    {
        print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
        exit();
    }
    
    class login_steam extends login_core implements interface_login
    {
        /**
         *       Properties passed from database entry for this method
         *       @access protected
         *       @param  array
         */
        protected $method_config        = array();
        /**
         *       Properties passed from conf.php for this method
         *       @access protected
         *       @param  array
         */
        protected $external_conf        = array();
        
        /**
         *       Constructor
         *       @access public
         *       @param  object  ipsRegistry object
         *       @param  array   DB entry array
         *       @param  array   conf.php array
         */
        public function __construct( ipsRegistry $registry, $method, $conf=array() )
        {
            $this->method_config    = $method;
            $this->external_conf    = $conf;
            
            require_once( IPS_ROOT_PATH . 'sources/loginauth/steam/lib/steam_openid.php' );
            
            parent::__construct( $registry );
        }
        
        /**
         *       Authenticate the member against your own system
         *       @access  public
         *       @param   string  Username
         *       @param   string  Email Address
         *       @param   string  Plain text password entered from log in form
         */
        public function authenticate( $username, $email_address, $password )
        {
            //Does the board use HTTPS For logins?
            $board_url = ipsRegistry::$settings['logins_over_https'] ? ipsRegistry::$settings['board_url_https'] : ipsRegistry::$settings['board_url'];
            
            //If the board uses HTTPS For logins and we are not using HTTPS get our butts onto HTTPS. Why? Because open id thinks the same website using http and https are actually different ones
            if(ipsRegistry::$settings['logins_over_https'] and !$_SERVER['HTTPS']) $this->registry->output->silentRedirect( ipsRegistry::$settings['base_url_https']."app=core&amp;module=global&amp;section=login&amp;do=process&amp;use_steam=1&amp;auth_key=".ipsRegistry::instance()->member()->form_hash );
            
            $steam_url = SteamSignIn::genUrl($board_url.'/interface/board/steam.php');
            
            // I say, Does this user be who he claims to be?
            $steam_id = $this->request['use_steam'] ? SteamSignIn::validate() : null;
            
            if( !$steam_id AND $this->request['use_steam'] )
            {
                $this->registry->output->silentRedirect( $steam_url );
            }
            
            
            //Passport Please
            if ( $steam_id )
            {
                //We have validated your Identity!
                $localMember = $this->DB->buildAndFetch(array('select' => 'member_id', 'from' => 'members', 'where' => "steamid='".$steam_id."'"));
                
                //Have you been here before?
                if ( $localMember['member_id'] )
                {
                    //Welcome Back lets just log you in here
                    $this->member_data = IPSMember::load( $localMember['member_id'], 'extendedProfile,groups' );;
                    $this->return_code = 'SUCCESS';
                }
                else
                {
                    //Welcome, lets just set you up with a temporary account. You can fill in the details in a second.
                    $avatar = $email = '';
                    $name = 'Unknown';
                    
                    $classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
                    $query = new $classToLoad();
                    $query->timeout = 20;
                    
                    /* Query Steam Community */
                    $response = $query->getFileContents("http://steamcommunity.com/profiles/{$steam_id}?xml=1");
                    
                    if ( $response )
                    {
                        // remove extra stuff before xml if they exist, headers seem to be returned
                        $response = substr($response, strpos($response, '<?xml'), strlen($response));
                        try {
                            $xml = new SimpleXMLElement($response, LIBXML_NOERROR, false);
                            if(!$xml->error)
                            {
                                if($xml->steamID)
                                    $name = str_replace(array('[',']','|',';',',','$',''','<','>','"'), '', (string)$xml->steamID);
                                if($xml->avatarFull)
                                    $avatar = (string)$xml->avatarFull;
                            }
                        }
                        catch (Exception $e) {
                            $name = ''; // community unavailable
                        }
                    }
                    
                    $this->member_data = $this->createLocalMember( array( 'members' => array(
                                                                                             'email'                    => $email,
                                                                                             'name'                        => $name,
                                                                                             'members_l_username'        => strtolower($name),
                                                                                             'members_display_name'        => $name,
                                                                                             'members_l_display_name'    => strtolower($name),
                                                                                             'joined'                    => time(),
                                                                                             'members_created_remote'    => 1,
                                                                                             'steamid'                    => $steam_id,
                                                                                             ),
                                                                         ) );
                    
                    if($avatar)
                    {
                        $classToLoad	= IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/member/photo.php', 'classes_member_photo' );
                        $photos			= new $classToLoad( $this->registry );
                        
                        $photos->save( $this->member_data, $photoType = 'url', $gravatar = '', $url = $avatar );
                    }
                    
                    $this->return_code = 'SUCCESS';
                }
                $this->request['rememberMe'] = TRUE;
                return true;
            }
        }
    }
Link to comment
Share on other sites

Thanks for creating this plugin! Great work. I posted this in the review thread, but I realize it's probably better suited here. Here's my modified auth.php which fetches the user's name (and pre-populates it) and avatar from steam community when they first sign-in.

--snip--


You probably want to wrap that save in a try/catch and check to see if the person's user name already exists in the database but other then that awesome, also what review thread?

try{
                        $this->photo->save($this->member_data, 'url', '', $avatar);
}catch(Exception $e){
                        //Something went wrong, ignore and continue.
}
Link to comment
Share on other sites

  • 1 month later...

Something is wrong with this. When trying to register with it, completing the registration gives a blank screen with the final details:

3b5d0Tf.png

Twitter/Facebook work.

EDIT: I've figured out what causes it literally seconds later. If you disable members from choosing a display name, you will get stuck at this screen.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...