This commit is contained in:
Eggman20339 2024-05-05 19:47:50 -04:00
parent 3b8fe12655
commit d1eb79541d

View File

@ -32,7 +32,7 @@ This works with both FIDO 2.0 devices as well as with U2F devices.
On Windows, the native WebAuthn API will be used.
"""
import time
import RPI.GPIO as GPIO
import RPi.GPIO as GPIO
import pickle
import psycopg2
import fido2.webauthn
@ -66,6 +66,7 @@ while True:
GPIO.output(14, GPIO.LOW)
print("Waiting for device...")
while True:
GPIO.output(14, GPIO.LOW)
dev = next(CtapHidDevice.list_devices(), None)
if dev:
@ -193,6 +194,8 @@ while True:
print("CLIENT DATA:", result.client_data)
print()
print("AUTH DATA:", result.authenticator_data)
GPIO.output(14, GPIO.LOW)
time.sleep(5)
except Exception as e:
GPIO.output(14, GPIO.LOW)
print("Authentication Failed!")