oneall / social-login-vbulletin

Social Login for vBulletin 4/5 allows your users to login and register with 35+ social networks. It increases your vBulletin user registration rate by simplifying the registration process for new users and provides permission-based social data retrieved from the social network profiles.
http://docs.oneall.com/plugins/guide/social-login-vbulletin/
7 stars 1 forks source link

vBulletin 5.5 Login problem #5

Open celestora opened 5 years ago

celestora commented 5 years ago

Plugin doesn't seem to login users after authorization. I couldn't figure out what the problem is exactly, but probably something seems to destroy the session before callback.php performs a redirect. There is a workaround to stop execution and perform redirect just before end of block (somwhere around line 198):

$result = vB_User::processNewLogin(array(
    'userid' => $userid
));

// Redirect
if (!empty($arguments['origin']))
{
    // Security check
    if (parse_url($arguments['origin'], PHP_URL_HOST) == parse_url($vbulletin->options['frontendurl'], PHP_URL_HOST))
    {
        $redirect_url = $arguments['origin'];
    }
}

# workaround
setcookie("sessionhash", $result["sessionhash"], time()+60*60*24*14, "/", NULL, true, true);
exec_header_redirect($redirect_url);
die;