Spomky-Labs/otphp

🔐 A PHP library for generating one time passwords according to RFC 4226 (HOTP) and the RFC 6238 (TOTP)

PHP

1,495

285 commits

updated Oct 1, 2026

See the code

README

TOTP / HOTP library in PHP

Build Status

Latest Stable Version Total Downloads Latest Unstable Version License

A php library for generating one-time passwords according to RFC 4226 (HOTP Algorithm) and RFC 6238 (TOTP Algorithm)

This library is compatible with Google Authenticator apps available for Android and iPhone. It is also compatible with other applications such as FreeOTP for example.

Documentation

The documentation of this project is available in the doc folder.

Support

I bring solutions to your problems and answer your questions.

If you really love that project, and the work I have done or if you want I prioritize your issues, then you can help me out for a couple of 🍻 or more!

Become a sponsor

Or

Become a Patreon

Contributing

Requests for new features, bug fixes and all other ideas to make this project useful are welcome.

Please report all issues in the repository bug tracker.

Also make sure to follow these best practices.

Licence

This software is release under the MIT licence.

hotp
otp
php
rfc-4226
rfc4226
rfc-6238
rfc6238
totp

Spomky-Labs/otphp

🔐 A PHP library for generating one time passwords according to RFC 4226 (HOTP) and the RFC 6238 (TOTP)

PHP

1,495

285 commits

updated Oct 1, 2026

See the code

README

TOTP / HOTP library in PHP

Build Status

Latest Stable Version Total Downloads Latest Unstable Version License

A php library for generating one-time passwords according to RFC 4226 (HOTP Algorithm) and RFC 6238 (TOTP Algorithm)

This library is compatible with Google Authenticator apps available for Android and iPhone. It is also compatible with other applications such as FreeOTP for example.

Documentation

The documentation of this project is available in the doc folder.

Support

I bring solutions to your problems and answer your questions.

If you really love that project, and the work I have done or if you want I prioritize your issues, then you can help me out for a couple of 🍻 or more!

Become a sponsor

Or

Become a Patreon

Contributing

Requests for new features, bug fixes and all other ideas to make this project useful are welcome.

Please report all issues in the repository bug tracker.

Also make sure to follow these best practices.

Licence

This software is release under the MIT licence.

hotp
otp
php
rfc-4226
rfc4226
rfc-6238
rfc6238
totp

Project health

Overall

6.0/10

Maintained

3/10

Code review

1/10

Contributors

10/10
OpenSSF Scorecard

Significant stargazers

Grégoire Pineau

813 followers · starred Feb 2021

Alexander Schranz

260 followers · starred Nov 2024

Helmut K. C. Tessarek

190 followers · starred Sep 2018

Laurent Laville

44 followers · starred Oct 2022