Ory Elements is a component library that makes building login, registration and account pages for Ory a breeze. Check out the components library on Chromatic https://www.chromatic.com/library?appId=63b58e306cfd32348fa48d50
A form cannot have two input fields with the same name. Unfortunately we need to also support express server-side rendering which does not include much JS on the client.
Due to the previous implementation only being in CSS and with limited browser support, this PR addresses those issues by implementing a strategy that works for both React and Express.
In the end we have more JS, but it's minimal and vanilla. We now never have more than 1 input field on the dom related to password and will only display the custom field for password entry. The visibility toggle has also been updated to be a div element with the dataset property keeping the state for the visibility icon to swap via css.
[ ] I confirm that this pull request does not address a security vulnerability.
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
[ ] I have added tests that prove my fix is effective or that my feature works.
[ ] I have added the necessary documentation within the code base (if appropriate).
Related Issue or Design Document
A form cannot have two input fields with the same name. Unfortunately we need to also support express server-side rendering which does not include much JS on the client.
Due to the previous implementation only being in CSS and with limited browser support, this PR addresses those issues by implementing a strategy that works for both React and Express.
In the end we have more JS, but it's minimal and vanilla. We now never have more than 1 input field on the dom related to password and will only display the custom field for password entry. The visibility toggle has also been updated to be a
div
element with thedataset
property keeping the state for the visibility icon to swap via css.https://github.com/ory/elements/issues/116
Checklist
Further comments