Add prompt for when Yubikey needs a touch response

This commit is contained in:
IamTheFij 2021-11-12 11:47:13 -08:00
parent 9a90449019
commit aed3fa502a

View File

@ -131,7 +131,10 @@ func main() {
} }
} else { } else {
name := flag.Arg(0) name := flag.Arg(0)
code, err := oath.CalculateOne(name) code, err := oath.Calculate(name, func(string) error {
fmt.Fprintf(os.Stderr, "Touch key to generate code for %s...", name)
return nil
})
slog.FatalOnErr(err, "failed to retrieve credential") slog.FatalOnErr(err, "failed to retrieve credential")
fmt.Println(code) fmt.Println(code)