Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FortiToken Mobile compatibility #106

Closed
saup007 opened this issue Sep 18, 2020 · 6 comments
Closed

FortiToken Mobile compatibility #106

saup007 opened this issue Sep 18, 2020 · 6 comments

Comments

@saup007
Copy link

saup007 commented Sep 18, 2020

>>> import pyotp
>>> import time
>>> totp = pyotp.TOTP("xxxxxxxx", interval=60)
>>> print("Current OTP:", totp.now(), time.asctime( time.localtime(time.time()) ))
Current OTP: 473903 Fri Sep 18 10:38:14 2020

FortiToken Mobile 865980

Onboard Security Algorithm: OATH time and event based
OTP generator: OTP Spec RFC 6238, RFC 4226

https://www.fortinet.com/content/dam/fortinet/assets/data-sheets/fortitoken.pdf

@kislyuk
Copy link
Member

kislyuk commented Sep 18, 2020

Can you please explain more explicitly what your issue is?

@saup007
Copy link
Author

saup007 commented Sep 18, 2020

Can you please explain more explicitly what your issue is?

I use the FORTITOKEN MOBILE commercial product, which is an OTP Spec RFC 6238, RFC 4226 based on the OATH time algorithm.

When the token generated using pyotp totp does not match the token generated by the FORTITOKEN MOBILE IOS APP.

@kislyuk
Copy link
Member

kislyuk commented Sep 18, 2020

OK - I have no idea why this would be the case. It looks like you're setting a custom interval; have you tried using the standard interval of 30s?

@saup007
Copy link
Author

saup007 commented Sep 21, 2020

OK - I have no idea why this would be the case. It looks like you're setting a custom interval; have you tried using the standard interval of 30s?

The 30 second interval is also incorrect, FORTITOKEN MOBILE defaults to 60 seconds.

@kislyuk
Copy link
Member

kislyuk commented Sep 21, 2020

This package implements the RFC correctly, as evidenced by the test suite examples which match the RFC references. I took a quick look at the doc you linked and it does not seem to provide any information beyond what you already pasted. So I'm afraid I have no idea why you are seeing a mismatch. This thread refers to the secret being transported in an encrypted form, so perhaps you are taking an encrypted secret and passing it on to PyOTP without decrypting it first.

@kislyuk
Copy link
Member

kislyuk commented Sep 21, 2020

Since I'm reasonably confident this is not a problem in PyOTP, I'm going to close this issue. If you need further assistance, feel free to comment here or open a new issue if there is a specific change that you would like PyOTP to implement.

@kislyuk kislyuk closed this as completed Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants