magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.53k stars 9.31k forks source link

Luma header links do not always reflect authentication status after logging out when using Varnish #37358

Open timothyfisherdev opened 1 year ago

timothyfisherdev commented 1 year ago

Preconditions and environment

Steps to reproduce

  1. Visit the storefront home page (in my case https://magento.test).
  2. Click the sign-in link in the top right.
  3. Sign-in with the sample data customer (roni_cost@example.com / roni_cost3@example.com)
  4. After being redirected back to the home page, you'll see the welcome message / dropdown in the top right. Click the dropdown arrow and sign-out.
  5. You'll be redirected to the logoutSuccess page (note that the top bar in the header correctly shows the default welcome msg as well as the sign-in/create account links)
  6. Once you are redirected to the home page, the top bar makes it look like you're still signed in. It shows the welcome message with a dropdown to view your account, wishlist, and log out. The sign-in/create account links are not visible.
  7. Refresh the page to get the top bar to properly show the guest links.

Expected result

When Varnish cache is enabled, the top bar links should still properly reflect whether the customer is logged in/out.

Actual result

You have to refresh the page after the logout redirect to get the top bar links to properly reflect whether you're logged in/out.

Additional information

I've only been able to reproduce this when Varnish is enabled. If I switch the full page cache setting to the built-in cache, everything works as it should.

annotely_image (1)

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @timothyfisherdev. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

timothyfisherdev commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @timothyfisherdev. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @timothyfisherdev, here is your Magento Instance: https://cdf0b9b015a1194edb1f378d65fb2641.instances-prod.magento-community.engineering Admin access: https://cdf0b9b015a1194edb1f378d65fb2641.instances-prod.magento-community.engineering/admin_191c Login: 84346098 Password: 073fd925c784

timothyfisherdev commented 1 year ago

I was able to reproduce this on the provided Magento instance. I switched the configuration setting to Varnish and went through the same steps. I know that Varnish is probably not installed on that demo instance, but, just switching the setting to Varnish seems to be enough to reproduce the issue.

bug3

After being redirected from the logoutSuccess page: bug2

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo, here is your Magento Instance: https://cdf0b9b015a1194edb1f378d65fb2641.instances-prod.magento-community.engineering Admin access: https://cdf0b9b015a1194edb1f378d65fb2641.instances-prod.magento-community.engineering/admin_114d Login: 46168130 Password: 47d60efba421

engcom-Bravo commented 1 year ago

Hi @timothyfisherdev,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

Screenshot 2023-04-11 at 1 24 14 PM Screenshot 2023-04-11 at 1 23 21 PM

The top bar links not reflecting properly whether the customer is logged in/out.

Hence confirming the issue.

Thanks.

github-jira-sync-bot commented 1 year ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-8552 is successfully created for this GitHub issue.

m2-assistant[bot] commented 1 year ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.