[WebAPI] customer email confirmation via WebAPI paradox
Preconditions and environment
- Magento 2.4.6 & 2.4.7
- Set config path
customer/create_account/confirmto1and clear cache to let this setting take effect - Register a customer account and keep it unconfirmed
Steps to reproduce
Try activate customer via https://<domain>/rest/V1/customers/me/activate.
Output: {"message":"The consumer isn't authorized to access %resources.","parameters":{"resources":"self"}
Try get customer access token as described in official document. You will get EmailNotConfirmedException(You may need a PHP debugger)
Expected result
Can activate(confirm) the customer via WebAPI.
Actual result
Cannot activate(confirm) the customer via WebAPI.
Additional information
See webapi.xml
<route url="/V1/customers/me/activate" method="PUT">
<service class="Magento\Customer\Api\AccountManagementInterface" method="activateById"/>
<resources>
<resource ref="self"/>
</resources>
<data>
<parameter name="customerId" force="true">%customer_id%</parameter>
</data>
</route>
This endpoint requires resource self.
Paradox:
So to activate(confirm) customer, you need customer token.
To get customer token, you need to activate(confirm) the customer first.
Related Customer Confirmation Bug: #39254
Release note
No response
Triage and priority
- [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [X] 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.
- [X] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @wubinworks. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.
- For more details, review the Magento Contributor Assistant documentation.
- Add a comment to assign the issue:
@magento I am working on this - To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues 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.
Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
- [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
- [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
- [ ] 3. Add
Area: XXXXXlabel to the ticket, indicating the functional areas it may be related to. - [ ] 4. Verify that the issue is reproducible on
2.4-developbranchDetails
- If the issue is reproducible on2.4-developbranch, please, add the labelReproduced on 2.4.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! - [ ] 5. Add label
Issue: Confirmedonce verification is complete. - [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @wubinworks,
Thanks for your reporting and collaboration.
We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.kindly refer the screenshots.
Create customer account via WebAPI
We are not able to activate(confirm) via WebAPI using confirmation key.
Hence confirming the issue.
Thanks.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-13281 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Hello @wubinworks ,
Adobe Commerce Engineering team started working on this issue. We will reach out to you if we need more information and you will get notified once the issue is fixed. Please leave comments for any further questions.
Thank you!