You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/ar/.local/pipx/venvs/openconnect-sso/lib/python3.11/site-packages/openconnect_sso/config.py", line 129, in totp
return pyotp.TOTP(totpsecret).now() if totpsecret else None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ar/.local/pipx/venvs/openconnect-sso/lib/python3.11/site-packages/pyotp/totp.py", line 64, in now
return self.generate_otp(self.timecode(datetime.datetime.now()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ar/.local/pipx/venvs/openconnect-sso/lib/python3.11/site-packages/pyotp/otp.py", line 35, in generate_otp
hasher = hmac.new(self.byte_secret(), self.int_to_bytestring(input), self.digest)
^^^^^^^^^^^^^^^^^^
File "/Users/ar/.local/pipx/venvs/openconnect-sso/lib/python3.11/site-packages/pyotp/otp.py", line 52, in byte_secret
return base64.b32decode(secret, casefold=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/base64.py", line 254, in b32decode
return _b32decode(_b32alphabet, s, casefold, map01)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/[email protected]/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/base64.py", line 236, in _b32decode
raise binascii.Error('Non-base32 digit found') from None
binascii.Error: Non-base32 digit found
fix was modifing config.py:
importbinascii# ...@propertydeftotp(self):
try:
totpsecret=keyring.get_password(APP_NAME, "totp/"+self.username)
returnpyotp.TOTP(totpsecret).now() iftotpsecretelseNoneexcept (keyring.errors.KeyringError, binascii.Error): # <-- added new exceptionlogger.info("Cannot retrieve saved totp info from keyring.")
return""
in my pipx installed files, so... no PR, sorry.
Seems like a new issue with newer pythons or something.
PS:
No i get a endless loop on M$ 2FA windows, because of confusion if app or code is used. Different topic...
The text was updated successfully, but these errors were encountered:
on mac i get this after starting openconnect-sso:
fix was modifing config.py:
in my pipx installed files, so... no PR, sorry.
Seems like a new issue with newer pythons or something.
PS:
No i get a endless loop on M$ 2FA windows, because of confusion if app or code is used. Different topic...
The text was updated successfully, but these errors were encountered: