lelag / otphp

PHP OTP Library compatible with Google Authenticator
MIT License
200 stars 60 forks source link

$totp->now() return invalid token #8

Open idanbenezra opened 8 years ago

idanbenezra commented 8 years ago

Hello,

$totp->now() return invalid token when token is starting with zero. for example:

if the token is 041934 the function returns the token without the zero (41934)

Spomky commented 8 years ago

From https://github.com/lelag/otphp/blob/master/README.markdown

Note : This project has not been updated since it was created. If you need a PHP OTP library, you should check out the great fork by Spomky-Labs at https://github.com/Spomky-Labs/otphp which has been improved and is currently maintained.