diff --git a/main.py b/main.py index 3f9a37d..16f805a 100644 --- a/main.py +++ b/main.py @@ -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!") \ No newline at end of file