Coder Social home page Coder Social logo

Comments (13)

SchlesserClaude avatar SchlesserClaude commented on June 19, 2024

Hello,

please refresh your PrestaShop cache like this:
http://docs.oneall.com/plugins/guide/social-login-prestashop/#3c

And then go to the Social Login setup in your PrestaShop admin area and click on the "Autodetect" and "Verify" buttons. Both tests must display a green success message.

from social-login-prestashop.

michaelhjulskov avatar michaelhjulskov commented on June 19, 2024

Hi :-) i did All that several times and im sure everything is okay. Also Tried various settings combinations.

from social-login-prestashop.

michaelhjulskov avatar michaelhjulskov commented on June 19, 2024

It works fine when I come from the login page but it have this issue when coming from my checkout page..

when i land on the "You have logged in with xxx Please wait, you are being redirected ..."
if i refresh it will submit onload and redirect me back - logged in.
So I always get logged in correctly, but I dont get redirected.

from social-login-prestashop.

michaelhjulskov avatar michaelhjulskov commented on June 19, 2024

Been doing a bit of bug tracking
I added some logs inside this :

public static function get_current_url ()
{
    //Get request URI - Should work on Apache + IIS
    $request_uri = (isset ($_SERVER ['REQUEST_URI']) ? $_SERVER ['REQUEST_URI'] : $_SERVER ['PHP_SELF']);
    $request_protocol = (self::is_https_on () ? 'https' : 'http');
    $request_host = (isset ($_SERVER ['HTTP_X_FORWARDED_HOST']) ? $_SERVER ['HTTP_X_FORWARDED_HOST'] : (isset ($_SERVER ['HTTP_HOST']) ? $_SERVER ['HTTP_HOST'] : $_SERVER ['SERVER_NAME']));

    // Make sure we strip $request_host so we got no double ports un $current_url
    $request_host = preg_replace('/:[0-9]*$/', '', $request_host);

    //We are using a proxy
    if (isset ($_SERVER ['HTTP_X_FORWARDED_PORT']))
    {
        // SERVER_PORT is usually wrong on proxies, don't use it!
        $request_port = intval ($_SERVER ['HTTP_X_FORWARDED_PORT']);
    }
    //Does not seem like a proxy
    elseif (isset ($_SERVER ['SERVER_PORT']))
    {
        $request_port = intval ($_SERVER ['SERVER_PORT']);
    }

    // Remove standard ports
    $request_port = (!in_array ($request_port, array (80, 443)) ? $request_port : '');

    //Build url
    $current_url = $request_protocol . '://' . $request_host . ( ! empty ($request_port) ? (':'.$request_port) : '') . $request_uri;
    PrestaShopLogger::addLog('oneallsocial line '.__LINE__.' '.$current_url, 1, null, null, null, true);
    //Done
    return $current_url;
}

and I got this in my log:
oneallsocial line 825 http://www.myshopname.com:62455/opc

is this indicating some issue?

from social-login-prestashop.

SchlesserClaude avatar SchlesserClaude commented on June 19, 2024

Are you using a proxy like for example nginx?

from social-login-prestashop.

michaelhjulskov avatar michaelhjulskov commented on June 19, 2024

Yes sir :)

from social-login-prestashop.

SchlesserClaude avatar SchlesserClaude commented on June 19, 2024

Could you add this to the server {...} section of your nginx configuration?

proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_x_forwarded_host;

That should fix the error.

from social-login-prestashop.

michaelhjulskov avatar michaelhjulskov commented on June 19, 2024

im total newb with that kindathing
i think i run lighttpd
and on my server I have lighttpd.conf
could that be the file I should add somthing to?

from social-login-prestashop.

SchlesserClaude avatar SchlesserClaude commented on June 19, 2024

In this case it might be easier to patch the plugin:

Please replace this:

// Remove standard ports
$request_port = (!in_array ($request_port, array (80, 443)) ? $request_port : '');

By

// Remove standard ports
$request_port = (!in_array ($request_port, array (80, 443, 62455)) ? $request_port : '');

from social-login-prestashop.

michaelhjulskov avatar michaelhjulskov commented on June 19, 2024

ahh i thought of doing that actually :)
Thanks a lot 👍

Finally fixed - it took me days and nights to find this :)

from social-login-prestashop.

SchlesserClaude avatar SchlesserClaude commented on June 19, 2024

Good that it's fixed now ;)

from social-login-prestashop.

michaelhjulskov avatar michaelhjulskov commented on June 19, 2024

By the way you should use {l s='Confirm'} in stead of "Confirm" in oneallsociallogin.tpl
<button name="submit" id="submit" type="submit" class="btn btn-default button button-medium"><span>{l s='Confirm'}<i class="icon-chevron-right right"></i></span></button>

from social-login-prestashop.

SchlesserClaude avatar SchlesserClaude commented on June 19, 2024

Thank you! Done!

from social-login-prestashop.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.