How to reset the password input value upon logout?

Whenever I logout, the password input fields in all of the forms (Login, Signup, etc.) that use the password field are populated with the latest token (using Xano Auth). How do I reset the password input field after logging out so that the password entry field is empty in the forms that use the password?

After logging in once, the form/field contains the token - like this:

image

After logging out, I want it to be reset to look like this:

image

I’ve tried: resetting the password input variable on form page load, resetting the password input variable on logout, resetting the token variable, etc.

Thanks

Hey @mdodds
It looks like an autocomplete from browser.
Have you tried adding the attribute autocomplete= off to your input?

1 Like

Thanks for the suggestion. I hadn’t tried this. I tried adding the autocomplete = off attribute to the password input but unfortunately it didn’t work.

For some reason, whenever I load any page with a password field, the value of that field input gets set to the value of the last auth token.

Autocomplete=off is on the form element, not the password input. YOu might try it in the former! I also found this Gist on managing form autofull that you might find helpful:

1 Like

I appreciate the suggestion.

I’ve tried turning off autocomplete at the form element level, as well as adding the autocomplete = off as an attribute on the password input element itself. Unfortunately, neither works. The password still always gets auto populated with the latest token value.

Perhaps there is something I can do to get the browser to forget the token so that it is null?