ory / elements

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
https://ory.sh
Apache License 2.0
85 stars 44 forks source link

fix: password input field #133

Closed Benehiko closed 1 year ago

Benehiko commented 1 year ago

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 the dataset property keeping the state for the visibility icon to swap via css.

https://github.com/ory/elements/issues/116

Checklist

Further comments