These forums are your way of communicating with the community of people developing and using tools provided by the OneAll platform. The forums are run by the community and moderated by the OneAll team during office hours.
Please stick to technical issues - and remember, no confidential information - these are public forums!

Can't log in (Magento Website)

edited December 2015 in Magento
Hi !

I'm working on a local Website (Magento), so i can't show it :/

I'm try to use Social Login (On my login page and in header).

When i click on a Facebook / Google button, i'm redericted on api page "You are log using XXXX" and after that, on my login page, without login. I had the same issues this week and i just reinstall extension but this way doesn't work this time !

It's how i proceed for my button :

<script type="text/javascript"> /* Replace #your_subdomain# by the subdomain of a Site in your OneAll account */ var oneall_subdomain = '<?php echo $subdomain; ?>'; /* The library is loaded asynchronously */ var oa = document.createElement('script'); oa.type = 'text/javascript'; oa.async = true; oa.src = '//' + oneall_subdomain + '.api.oneall.com/socialize/library.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(oa, s); </script> <script type="text/javascript"> pathArray = location.href.split( '/' ); protocol = pathArray[0]; host = pathArray[2]; url = protocol + '//' + host + '/customer/account/login/?oneall=login'; /* Embeds the buttons into the container oa_social_login_container */ var _oneall = _oneall || []; _oneall.push(['social_login', 'set_providers', [<?php echo $providers; ?>]]); _oneall.push(['social_login', 'set_callback_uri', (url)]); _oneall.push(['social_login', 'do_render_ui', 'flyout-signIn-type']); </script> <div class="flyout-signIn-type"></div>

Variable $subdomain ans $providers and url are Ok, and this now, i'm showing you a print_r of my post data :

Array ( [oneall] => login [oa_action] => social_login [oa_social_login_token] => Token form : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx [connection_token] => (Same Token) [identity_vault_key] => (Nothing) )

When i click on connect, my api increment the number "User returned" and my Facebook and Google App increment they request number.

Any idea of what i'm doing Wrong ? If you need other information just ask :)

I really need help !!

Thanks !

Best Answer

  • Hi,
    Update: there is a bug in the magento plugin, which is soon fixed on the github repo (and later replicated elsewhere).
    If a user registered with OneAll is deleted (via the administrative interface), then the behaviour described by the post occurs (regular social login with a failed magento login, after without much information).
    There is also another question regarding redirection.
    We'll update this post regularly.

Answers

  • Hi,
    Try adding: index.php in the callback URI (before the /customer).
    You build the callback URL in your JS code:
    url = protocol + '//' + host + '/customer/account/login/?oneall=login';

    Hope this helps.
  • Hi ! Thanks for your answer, but adding index.php in my callback URI doesn't change anything ... I'm literally lost with this ><
  • What is the new callback URL you provide?
  • The same URL with index.php :

    url = protocol + '//' + host + '/index.php/customer/account/login/?oneall=login';

    I'm doing this wrong ?
  • Hi,
    It looks correct.
    We use:_oneall.push(['social_login', 'set_callback_uri', (window.location.href + ((window.location.href.split('?')[1] ? '&amp;' : '?') + 'oneall=login'))]);
    When the HTML is rendered, what is the JS code inserted?
    (look for something like:
    var plugin;
    plugin = new oa_social_login({"id":82488,"parent_uri":"http:\/\/www.magentosite.loc\/index.php\/customer\/account\/login\/","callback_uri": ...
    )
  • edited December 2015
    I had this :

    var plugin ; plugin = new oa_social_login( { "id":25546, "parent_uri":"http:\/\/[my_correct_site_url]\/", "callback_uri":"http:\/\/[my_correct_site_url]\/customer\/account\/login\/?oneall=login", "css_theme_uri":null, "use_modal_dialog":false, "force_reauth":false, "disable_popups":null, "demo":false, "pluginkey":"social_login", "linked_providers":[], "grid_size_x":99, "grid_size_y":99, "providers":["facebook","google"], "providers_scope":null }); plugin.setup_login_frame("providers");

    In my url i don't have 'www' only my local website name, and index.php is not here ... I tried to add it manually on my page and it doesn't work either ...
  • Hi,
    The JS code:var plugin ; plugin = new oa_social_login( { "id":25546, is automatically added by this code:<script type="text/javascript"> pathArray = location.href.split( '/' ); protocol = pathArray[0]; host = pathArray[2]; url = protocol + '//' + host + '/customer/account/login/?oneall=login'; /* Embeds the buttons into the container oa_social_login_container */ var _oneall = _oneall || []; _oneall.push(['social_login', 'set_providers', [<?php echo $providers; ?>]]); _oneall.push(['social_login', 'set_callback_uri', (url)]); _oneall.push(['social_login', 'do_render_ui', 'flyout-signIn-type']); </script>
    So, you need to place the correct parameters in the _oneall.push calls.
    The callback URI is incorrect. You need the index.php there (and the correct host, as you say).
    We don't know how you build your button, so we can't really tell you where it is supposed to go.

    Feel free to send an email if you want more details on this, with private information.

    Hope this helps.
  • Hi,
    Also try changing <div class="flyout-signIn-type"></div>to<div id="flyout-signIn-type"></div>
    Hope this helps.
  • No, nothing change ! Always the same issue ... I cleared all my cache, and delete all my cookies, when i try a pop-up ask me to connect and after that, i'm redirected on my login page but Oneall buttons dissapeared ...
Sign In or Register to comment.