Skip to content

Magento session ends after making a GraphQL request #34550

Closed
@malero

Description

@malero

Preconditions (*)

  1. New issue when upgrading one of our sites from 2.3 to 2.4
  2. The following commit has caused the issue
    937a3e2d16183c3e9dd9220ce383e578a2dff50e

Steps to reproduce (*)

  1. Login to a Magento store and start a session
  2. Make a GraphQL request. I'm not sure if all queries are affected or just the one we are using, which is the categories query
  3. Refresh the page and see that you're logged out

Expected result (*)

  1. The user remains logged in

Actual result (*)

  1. The ClearCustomerSessionAfterRequest plugin logs the customer out

Note

I believe this to be a bug with Magento 2.4 OR a documentation issue. If you look at the generateCustomerToken mutation, it mentions session-based authentication as an alternative to making requests with a bearer token.


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • 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

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions