Skip to content

Customer Token Generated on Website A Can Be Used on Website B in Website-Scoped Customer Configuration #40847

@bashizee

Description

@bashizee

Preconditions and environment

Issue Description

We have a Magento instance configured with website-scoped customers (customer/account_share/scope = 1).

When a customer logs in on Website A using the GraphQL mutation:
mutation { generateCustomerToken( email: "customer@example.com" password: "password" ) { token } }
However, we observed that the same token can be used to authenticate GraphQL requests against Website B, even though customers are configured to be website-scoped.

Steps to reproduce

Steps to Reproduce
1. Configure Magento with website-scoped customers.
2. Log in to Website A using generateCustomerToken.
3. Obtain the customer token.
4. Send a GraphQL request to Website B using: Authorization: Bearer <token_from_website_A>

Expected result

When customer accounts are website-scoped, a customer token generated for Website A should only be valid for the customer account belonging to Website A. The token should not authenticate requests against a different website that has a separate customer scope.

Actual result

A token generated on Website A can be reused successfully on Website B, allowing authentication across websites despite website-scoped customer configuration.

Additional information

No response

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: GraphQLGraphQLIssue: 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.Reported on 2.4.xIndicates 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
    No fields configured for issues without a type.

    Projects

    Status
    Ready for Development

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions