Skip to content

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

Open
@timothyfisherdev

Description

@timothyfisherdev

Preconditions and environment

  • Magento: 2.4.5
  • Varnish: 7.3.0 (stores -> configuration -> advanced -> system -> full page cache (set to Varnish))
  • Install sample data
  • Luma theme
  • I'm in developer mode so I can see the Varnish headers

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 ([email protected] / [email protected])
  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

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: AccountComponent: CustomerIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReported on 2.4.5Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions