Hi all, Has anyone managed to implement a confirm...
# ory-selfhosting
a
Hi all, Has anyone managed to implement a confirm password box in with self-hosted Ory Kratos? Currently, when our users are changing their password, they only have to enter it once, meaning they could make a mistake when typing. I have looked here, but not managed to find anything: https://www.ory.sh/docs/kratos/self-service/flows/account-recovery-password-reset We are using our own fork of this repo: https://github.com/ory/kratos-selfservice-ui-react-nextjs Thanks in advance, Sam
Initial thoughts are that if there is not a simple bit of config to enable, I will have to customise the recovery flow to get the backend to send our UI another password confirm box. Am I on the right track?
l
We don't do password confirmation (it's annoying) and instead have a way to show the password as clear text. It's a much better experience for people on phones 🤷🏼‍♂️
a
I will relay this to my superiors. Thank you.
l
You can also use your own backend server to do custom stuff and use the API versions of the kratos API. That's a bit more involved though
a
In my position, would you keep it simple where possible?
Do you happen to know where the clear text config can be found?
l
The clear text password thing is all a UI button toggle with some JavaScript. Just change the password input to a text input and then back again
a
Thanks, I'll let you know how it goes.
b
@adamant-guitar-51770
Copy code
function togglePasswordVisibility() {
      var passwordInput = document.querySelector("input[name='password']");
      if (passwordInput.type === "password") {
        passwordInput.type = "text";
      } else {
        passwordInput.type = "password";
      }
That's all the code you need to toggle password visibility
113 Views