diff --git a/nameko1.py b/nameko1.py index 983acd0..efb37da 100644 --- a/nameko1.py +++ b/nameko1.py @@ -86,10 +86,13 @@ class OTPSeed: @timer(interval=10) def auth(self): - seed = otp.get_seed("app1") + seed = self.otp.get_seed("app1") totp = pyotp.TOTP(seed) + token = totp.now() - print("seed / token: {} {}".format(seed, token)) + res = self.otp.verify("app1", token) + + print("seed / token / res {} {} {}".format(seed, token, res)) class OTPService: name = "otp"