Is there a way to securely take user input? (e.g. passwords)

Is there any way (either inbuilt or via a workaround) to handle user input passwords securely? By securely I mean, masked, not logged or persisted anywhere (transitive or permanently). I’m interested in options both via lovelace & google assistant (if that’s at all possible)?

For the lovelace side I’m currently using an input_text box set to mode: password, then excluding it from the recorder and logbook. Finally I have to have a script running to clear it after use. This is clunky and there are a few drawbacks to this, is there a better way?

Thanks for your help

Search the documentation.

Not that I know of. I was going to suggest what you are already doing.

Ok thanks - appreciate your help