magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Chrome Admin Login fails

Open michaeltimm81 opened this issue 12 years ago • 16 comments

Trying to login into admin via Chrome fails with no error message.

In Magento 1 disabling system config -> web -> default cookie settings -> use HTTP only fixed this issue, but in Magento 2 this option seems to have no effect.

michaeltimm81 avatar Dec 05 '14 12:12 michaeltimm81

Can you please provide us more details? Did you select HTTPS option for admin during installation, and are you trying to login using HTTPS?

safwkhan avatar Dec 06 '14 03:12 safwkhan

I did not select HTTPS for admin during installation. The admin url is not HTTPS either.

It seems to resolve the issue when I set the base url to http://127.0.0.1 instead of http://localhost. Then I am able to see the ‚admin‘ cookie in Chromes developer tools and login works fine.

michaeltimm81 avatar Dec 06 '14 10:12 michaeltimm81

@michaeltimm81 Cookies are designed for second level domains so on a first level domain (like localhost) you wont be able to use any application which uses cookies on localhost. One of the simplest solutions is to create a virtaulhost like magento2.dev and set it up as a base url (having a '.' in domain is a thing which distinguish first and second level domains).

jemoon avatar Dec 06 '14 13:12 jemoon

Is this new in Magento 2? It worked in Magento 1 and it also works with every other Browser than Chrome.

michaeltimm81 avatar Dec 06 '14 13:12 michaeltimm81

Hi @michaeltimm81, it was not new, but possible workaround. Can you please let us know if you have resolved the issue with latest code.

maksek avatar Dec 29 '14 16:12 maksek

Works :)

michaeltimm81 avatar Jan 16 '15 16:01 michaeltimm81

Awesome, closing the issue, feel free to reopen in case if it will occur again

maksek avatar Jan 20 '15 15:01 maksek

The issue is back. Changing the base url to 127.0.0.1 doesn't fix this anymore, with localhost there is no cookie set at all. With 127.0.0.1 there is only a form_key cookie set, but no admin cookie.

michaeltimm81 avatar Feb 06 '15 10:02 michaeltimm81

Yep. I also got this issue loggin in Chrome.

gesell avatar Jun 24 '15 20:06 gesell

Internal ticket: MAGETWO-39582

vpelipenko avatar Jul 01 '15 16:07 vpelipenko

I had this issue. I had to made the database connection of "localhost" to "127.0.0.1". I don't know how that really mattered and resolved internally.

maskeyarun avatar Sep 08 '15 16:09 maskeyarun

Hello @maskeyarun, @eskaliert and @michaeltimm81

I have tried to reproduce the issue, used localhost, 127.0.0.1, magento.loc and different db connection settings (and I would like to assure you that connection settings can not impact authentication, if you application able to connect and have access to DB). And I can not reproduce this issue (except localhost case).

So problem with localhost described in this post http://alankent.me/2015/04/25/use-of-localhost-when-installing-magento-2-quick-note/. Currently Magento does not support not fully qualified domain names.

I found only one possible configuration problems that can be reason of this issue. Probably you have set localhost in Magento config. Please check core_config_data table, web/unsecure/base_url and web/secure/base_url values. In this case does not meter which url used to access admin panel, it will redirect you to localhost.

If this is not the case, please provide me more details how to reproduce the issue:

  1. app/etc/env.php file
  2. dump of core_config_data table
  3. what exactly domain do you use

Thank you

vancoz avatar Oct 08 '15 21:10 vancoz

Trying to Login to Admin panel(Magento 2) with chrome failed with no error message with firefox its working fine

1.Tried different domain name instead of local host 2. Tried disabling system config -> web -> default cookie settings -> use HTTP only

But No luck

Vasimkadiwala avatar Oct 27 '15 18:10 Vasimkadiwala

I had an issue while logging in to admin panel from firefox. It says that Username or Password is wrong or account is currently disabled. I tried to correct some of source codes but doesn't work.Any solution for this??

deepthi743 avatar Nov 30 '15 06:11 deepthi743

@michaeltimm81 has your issue been resolved? Have you followed @vancoz's suggestion above

mazhalai avatar Dec 31 '15 15:12 mazhalai

@michaeltimm81, since we have not heard from you for quite some time, we will go ahead and close this issue. In case you have any further questions, don't hesitate to reopen.

sshrewz avatar Feb 23 '16 20:02 sshrewz