fetchify-dev / magento2

Fetchify Magento 2 Integration
https://fetchify.com
3 stars 6 forks source link

Bug with Access Token #20

Closed faradey closed 3 years ago

faradey commented 3 years ago

Hello! Please, rewrite the code from

<field id="accesstoken" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Access Token</label>
                    <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
                    <validate>token-format</validate>
                </field>

to

<field id="accesstoken" type="obscure" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Access Token</label>
                    <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
                    <validate>token-format</validate>
                </field>

Namely, type text to type obscure. Otherwise, the module does not work for Magento 2.4.3.

Ashwin-Fetchify commented 3 years ago

Hi @faradey,

Thanks for raising this issue.

We found no issues installing, configuring and utilising our plugin on a fresh Magento 2.4.3 installation.

It could be that another plugin is conflicting with ours, e.g. a one-page checkout plugin.

Thanks, Ashwin

faradey commented 3 years ago

When do you use <backend_model> Magento \ Config \ Model \ Config \ Backend \ Encrypted </backend_model> should indicate type = "obscure" and you have specified type = "text" This is a minor bug, but it prevents the token from being saved normally in the settings. I ask you to fix it in the next versions of the module

Jack-Fetchify commented 3 years ago

@faradey Are you trying to encrypt the backend HTML? If so can you explain why, since only the admin can see the token in plain text?