pyauth / pyotp

Python One-Time Password Library
https://pyauth.github.io/pyotp/
Other
2.97k stars 323 forks source link

Support for Synology 2FA? #134

Closed cwbsl closed 1 year ago

cwbsl commented 2 years ago

I'm using the Synology Python API to get data from 4 different NAS. Since I enabled 2FA on all of them I wanted to use PyOTP to generate the correct OTP codes for it. The problem is that those codes are not being accepted. I have extracted the secrets from the QR codes provided and pass those to the pytotp.TOTP() method. The problem is that the codes that PyOTP generates (I'm using totp.now()) are not being accepted.

i-am-unknown-81514525 commented 2 years ago

Can you giving out the url of the QR code? Just remember to remove the secret so no other can access.

kislyuk commented 2 years ago

Thanks for noting this issue. I do not use Synology but according to their documentation, their 2FA solution is compatible with any third-party app, implying support for standard TOTP. Some reports indicate the Synology UI unexpectedly displaying a QR code to download the Synology OTP code generator mobile app instead of the otpauth uri that can be scanned with the 2FA app.

If you still need help, please post an image of the QR code generated by a test installation, or the decoded content of the QR code with the secret redacted if needed.

kislyuk commented 1 year ago

Closing since there doesn't seem to be anything to do here.