Migrate christian-riesen/otp to TypeScript

D Converted · version 2.7.0

christian-riesen/otp 2.7.0 is a PHP package released under the MIT license and requires PHP >=5.6.0. Pext migrates it to TypeScript; on Node.js, 2 of 12 PHPUnit tests pass (16.6%), with no failures and 10 errors. It depends on 3 tracked packages (weakest tier: Converted), and no tracked package depends on it.

One Time Passwords, hotp and totp according to RFC4226 and RFC6238

ConvertsYes
Runs on Node.jsYes
Runs on BunNot yet measured
TypeScript typesNot emitted

PHPUnit results on Node.js

16.6% of 12 tests passing (2 passed, 0 failed, 10 errors, 0 skipped). Verified 2026-10-21.

Where tests fail

The 2 test classes with the most failing tests on Node.js:

Test classFailing tests
OtpTest8
GoogleAuthenticatorTest2

What “Converted” means

Converts cleanly to TypeScript. Test verification is pending or still climbing.

Requirements

PHP
>=5.6.0
Extensions
None declared

As declared in the package's Composer metadata. Pext provides PHP extensions through its runtime modules.

Dependencies

Weakest dependency: D Converted

Used by

No tracked package depends on christian-riesen/otp.

Upstream

Version
2.7.0
License
MIT
Homepage
https://github.com/ChristianRiesen/otp
Keywords
otp, hotp, totp, googleauthenticator, rfc4226, rfc6238

Migrating a codebase that uses christian-riesen/otp?

See how Pext migrates a real PHP application, its Composer dependencies and its test suite to TypeScript.