Skip to content

Conversation

fiifiappiah
Copy link

@fiifiappiah fiifiappiah commented Feb 10, 2022

Description (*)

When a magento install with more than one store tries to utilize the login as Customer GraphQl to get a token for any store other than the default store- an error is thrown for customers not being found even when they exist.

Manual testing scenarios (*)

  1. For any multi store implementation of Magento Run the following mutation with with a store other than the default:
    mutation{
    generateCustomerTokenAsAdmin(input: {
    customer_email: "test@test.com"
    }){
    customer_token
    }
    }
  2. Run the above mutation.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Fix GraphQL login as customer token not working for multi stores #35084: Fix GraphQL login as customer token not working for multi stores

@m2-assistant
Copy link

m2-assistant bot commented Feb 10, 2022

Hi @fiifiappiah. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@fiifiappiah
Copy link
Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@sdzhepa
Copy link
Contributor

sdzhepa commented Feb 10, 2022

@magento create issue

@m2-community-project m2-community-project bot added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Mar 1, 2022
@shikhamis11 shikhamis11 self-assigned this Mar 9, 2022
@m2-community-project m2-community-project bot added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label Aug 10, 2022
@engcom-Charlie
Copy link
Contributor

Hi @shikhamis11,

Thank you for your contribution!

Can you please do the code review so that we can move this PR further towards merging.

Thank you!

@engcom-Charlie
Copy link
Contributor

Hi @fiifiappiah,

Thank you for your contribution!

It seems that the issue has been resolved in commit on 2.4-develop

I have also tried to reproduce this issue by following ways:

  1. Created multistore magento instance.
  2. Created new users on different store with "Allow remote shopping assistance"
  3. Tried to execute mutation:
    mutation{
    generateCustomerTokenAsAdmin(input: {
    customer_email: "other@yopmail.com"
    }){
    customer_token
    }
    }

image

Observed that, generateCustomerTokenAsAdmin mutation is working fine as expected by providing the token.

On the basis of above findings and since the issue is now not reproducible on 2.4-develop branch closing this PR.

Please reopen and update if you wish to continue.

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Api Area: APIs Component: LoginAsCustomerGraphQl Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Project: GraphQL Release Line: 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Fix GraphQL login as customer token not working for multi stores
6 participants