PHPGangsta / GoogleAuthenticator

PHP class to generate and verify Google Authenticator 2-factor authentication
http://phpgangsta.de/4376
BSD 2-Clause "Simplified" License
2.23k stars 688 forks source link

TOTP and HOTP, Base 32 Standard #29

Open abmmhasan opened 8 years ago

abmmhasan commented 8 years ago
  1. Google Authenticator Supports both TOTP and HOTP! Why don't you Implement both.
  2. Base32 function should be separated and use this repo https://github.com/ChristianRiesen/base32 (as that is a standard by required RFC)
Conver commented 8 years ago

+1

PHPGangsta commented 7 years ago

I guess TOTP is used much more often than HOTP... A Pull Request with a HOTP implementation would be awesome!

The built-in _base32Decode() function works fine, I'm not sure why to add a dependency to this project, just to get the same result. I don't see an advantage. Currently you can just copy the file PHPGangsta/GoogleAuthenticator.php and start your work, if you don't like composer for example. With an external dependency it gets more complicated.