-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Customer Token Generated on Website A Can Be Used on Website B in Website-Scoped Customer Configuration #40847
Copy link
Copy link
Open
Labels
Area: AccountComponent: GraphQLGraphQLGraphQLIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is 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.A 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.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Metadata
Metadata
Assignees
Labels
Area: AccountComponent: GraphQLGraphQLGraphQLIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is 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.A 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.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Ready for Development
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