jan-janssen / pyauthenticator

Similar to the Google authenticator just written in Python to automate annoying two factor authentication.
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

Otpauth #47

Closed mgt16-LANL closed 1 year ago

mgt16-LANL commented 1 year ago

Hi Jan,

I'm getting an error using pyauthenticator - I'm getting the following error attempting to setup a new authentication:

ImportError: cannot import name 'OtpAuth' from 'otpauth' (/Users/mgt16/miniconda3/envs/architector/lib/python3.10/site-packages/otpauth/__init__.py)

It looks like there's only HOTP and TOTP functions within the otpauth package. This was done with otpauth version 2.1.0 from conda-forge.

Do you know which of these is a good replacement for OtpAuth?

-Michael

mgt16-LANL commented 1 year ago

Looks like HOTP was the replacement in v2 for the OtpAuth in v1. For now I'll downgrade otpauth. https://otp.authlib.org/

jan-janssen commented 1 year ago

Can you check your version of the pyauthenticator? It should be 0.2.0 as we recently switched from https://github.com/jan-janssen/pyauthenticator/pull/44 otpauth to pyotp

mgt16-LANL commented 1 year ago

I was using 0.0.1 - I believe this was default from conda-forge. Updating to 0.2.0 now!

jan-janssen commented 1 year ago

Yes, a couple of things changed in the last month. Is it working now?

mgt16-LANL commented 1 year ago

It's working now - but I had to do a quick shuffle of installations. I had to run:

mamba uninstall pyzbar
mamba install zbar
mamba install pyzbar

After this it worked just fine!

jan-janssen commented 1 year ago

Ok, I am a bit confused why conda / mamba messed up the dependencies, hopefully it only affects users upgrading from an older version and the fresh install works fine. I am going to close the issue now, but feel free to reopen it, in case the issue comes up again.

jan-janssen commented 1 year ago

@mgt16-LANL I just received an Apple ARM system and recognised that zbar was not available for Apple ARM. This is now fixed and with the added support of zbar for Apple ARM it is now possible to install pyauthenticator=0.2.0 on Apple ARM systems.

mgt16-LANL commented 1 year ago

Hi @jan-janssen , I installed it in a separate environment I configured to use x86 architecture - https://stackoverflow.com/questions/71515117/how-to-set-up-a-conda-osx-64-environment-on-arm-mac .

jan-janssen commented 1 year ago

@mgt16-LANL Sorry, I just realised I made a mistake in the previous comment - it is now possible to install pyauthenticator=0.2.0 in pure Apple ARM environments.