odensc / yubioath-krunner

Displays your YubiKey OATH credentials in krunner when you search for them.
4 stars 4 forks source link

request touch #3

Closed GottZ closed 5 years ago

GottZ commented 5 years ago

if oath keys were set up with touch requirement, yubioath-krunner will not prompt for interaction and instead fail silently

code i'm talking about:

    def get_code(self, cred_id):
        result = subprocess.run(["ykman", "oath", "code"], stdout=subprocess.PIPE)
        codes = result.stdout.decode()
        return re.search("{} +(\d+)".format(cred_id), codes).groups()[0]

ykman oath code can accept a further argument. if you specify the cred_id as argument you can be prompted for touch input