magento-2-social-login icon indicating copy to clipboard operation
magento-2-social-login copied to clipboard

Can create account, but can not log in with existing account, also typo

Open ajpirciovs opened this issue 4 years ago • 5 comments

Using your extension (both from your website and via composer) I can log in with a brand new email, but if I log out and try to log in again it shows the screen asking you to complete the information to create an account. If I enter my email it says that e-mail already exists. This happens with google, facebook, and linkedin sign-in attempts

Preconditions

  1. Magento: 2.3.5-p1
  2. PHP: 7.2

Steps to reproduce

  1. Fresh magento install
  2. Install module
  3. Set up for google auth
  4. Log in with existing email address for customer
  5. Can't log in

Expected result

  1. Successful log in

Actual result

  1. image

Also, it says "creat" and not "create"

ajpirciovs avatar Dec 10 '20 21:12 ajpirciovs

After diving into this some more and debugging it I think the problem exists in Controller/Social/Login.php

In commit b92250341146016e2fb21debe6cbbb12c1a800bd on Oct 1 There are no conditions which get you to $this->refresh($customer); line 113, which is where the customer gets logged in

line 73 if (!$customer->getId()) { ok here if we don't have a customer fine...

line 88 } else { else go in here....

then you have 2 if statements checking the password hash, BOTH of which have return statements and they both return javascript for fakeEmailCallback which seems wrong here

reverting the file to the previous version for this execute function seems to work

ajpirciovs avatar Dec 10 '20 22:12 ajpirciovs

Hi @ajpirciovs

I'm Victor from Mageplaza. I would like to answer your question. You can refer to this commit: https://github.com/mageplaza/magento-2-social-login/commit/e3d600da705ded98c7c012754e286c951a3f1f49 Then try with this change and let me know about the result. Thank you!

Best Regards, Victor

Victor-Mageplaza avatar Dec 11 '20 01:12 Victor-Mageplaza

Yes Victor that works much better. While you're updating you should change the spelling on "creat" in Mageplaza/SocialLogin/view/frontend/templates/popup/form/email.phtml on line 31

Any chance these changes could get pushed to your composer package?

ajpirciovs avatar Dec 11 '20 14:12 ajpirciovs

Hi @Victor-Mageplaza : will you update the composer package please ? We'll need this for an incommining Production environnement (next week)

410Gone avatar Jan 20 '21 14:01 410Gone

Hi @410Gone new package has been updated. You can check it again on the main branch

Victor-Mageplaza avatar Jan 22 '21 01:01 Victor-Mageplaza