google / google-authenticator

Open source version of Google Authenticator (except the Android app)
Apache License 2.0
5.21k stars 967 forks source link

Can the default of google authenticator produce totp changed into 10 minutes? #604

Open bagasprstyadi opened 7 years ago

bagasprstyadi commented 7 years ago

Hello, I wanna ask something. Is it possible to change the default of totp generated from the authenticator app to become a 10m Period totp code? Because in my code, all OTP that are generated is for 10m period (Message, Email, etc) thats why, I need all verify code to be a 10m period totp code, where 30m totp code cannot be used to verify 10m totp code, so all code that is generated from GA is failed, but if I change all verify back to 30m GA can be used again. Anyone has a suggestion? Thankyou

ThomasHabets commented 7 years ago

But why?

(but also: probably won't be done, but pull requests for adding support welcome)

davchana commented 5 years ago

@bagas can you setup your code-accepting logic to accept any otp codes within 5 minutes +- window?

devfxplayer commented 4 years ago

yes you can, change the 30 seconds parameter in the function call to any number you want and on verify the number generate a number based on the new logic you changed