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

Hide API password fields #361

Merged
merged 2 commits into from Nov 28, 2023
Merged

Hide API password fields #361

merged 2 commits into from Nov 28, 2023

Conversation

mntzrr
Copy link
Contributor

@mntzrr mntzrr commented Nov 13, 2023

Make the API password fields, password fields.

@mntzrr
Copy link
Contributor Author

mntzrr commented Nov 13, 2023

Task linked: CU-86932g4e6 Mask API password

Copy link
Contributor

@MichaelBengtsson MichaelBengtsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will indeed hide the passwords, but it will also make browsers attempt to auto-complete them. Which we saw when we first introduced this in KCO. The browser would fill the username and passwords with the login credentials from the WordPress store if the merchant had this stored. Causing them to break the integration when updating the settings.

Please add a custom attribute to this that disabled auto-completion:
'custom_attributes' => array( 'autocomplete' => 'new-password', ),
You can see how its done in KCO here:
https://github.com/krokedil/klarna-checkout-for-woocommerce/blob/master/classes/class-kco-fields.php#L95-L134

Copy link
Contributor Author

@mntzrr mntzrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made the necessary changes.

@MichaelBengtsson MichaelBengtsson merged commit 584e9ae into develop Nov 28, 2023
0 of 3 checks passed
@MichaelBengtsson MichaelBengtsson deleted the develop-api-mask branch November 28, 2023 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants