gotp
gotp copied to clipboard
Print characters to show input feedback for seeds
Currently when pasting/entering a seed there is no feedback to let the user know if their input was received. As some terminals maintain a separate copy/paste buffer than the host window environment this can lead to confusing situations for users.
From a look around at the web, it looks like there isn't a prebuilt way to prompt for a password and show it as *
s for Go. The complexity of implementation goes from a quick call to stty -echo
to having to manually overwrite characters as they're entered. It'd be a nice future feature when I have the time but for now I've added a small error message that tells the user they didn't paste anything:
+ if secret == "" {
+ return errors.New("hmm, doesn't look like I got anything. Are you using the correct paste buffer?")
+ }