Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebAPI] customer email confirmation via WebAPI paradox #39255

Open
2 of 5 tasks
wubinworks opened this issue Oct 11, 2024 · 1 comment
Open
2 of 5 tasks

[WebAPI] customer email confirmation via WebAPI paradox #39255

wubinworks opened this issue Oct 11, 2024 · 1 comment
Labels
Issue: ready for confirmation Reported on 2.4.7 Indicates original Magento version for the Issue report.

Comments

@wubinworks
Copy link

Preconditions and environment

  • Magento 2.4.6 & 2.4.7
  • Set config path customer/create_account/confirm to 1 and 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.
  • 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”.
Copy link

m2-assistant bot commented Oct 11, 2024

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.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues 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 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.

@engcom-Bravo engcom-Bravo added the Reported on 2.4.7 Indicates original Magento version for the Issue report. label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: ready for confirmation Reported on 2.4.7 Indicates original Magento version for the Issue report.
Projects
Status: Ready for Confirmation
Development

No branches or pull requests

2 participants