Skip to content

Interface: TotpOptions ​

Code length, step and time for a TOTP code. The defaults match authenticator apps.

Properties ​

PropertyModifierTypeDescription
digits?readonlynumberCode length. Authenticator apps use 6.
now?readonlynumberUnix time in seconds. Defaults to now; injectable for tests.
period?readonlynumberTime step in seconds. Authenticator apps use 30.

MIT License. Not affiliated with, endorsed or sponsored by Meta or Instagram.