SkillAgentSearch skills...

Otpauth

Implements two-step verification of HOTP/TOTP. Also known as one time password.

Install / Use

/learn @authlib/Otpauth
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="docs/_static/dark-logo.svg"> <img alt="OTP Auth logo" src="docs/_static/light-logo.svg" height="68"> </picture>

One time password implementations in Python. HOTP and TOTP.

Github Actions PyPI codecov Maintainability Rating Security Rating

</div>

Usage

A quick and simple usage of HOTP:

import otpauth

totp = otpauth.HOTP(b"user-secret")

# generate a code for now
code: int = totp.generate()

# you may want to convert it to string
str_code: str = totp.string_code(code)

# verify the code
totp.verify(code)  # => True
totp.verify(str_code)  # => True

Install

Install with pip:

pip install otpauth

Useful links

  • Documentation: https://otp.authlib.org/
  • Blog: https://blog.authlib.org/
  • Twitter: https://twitter.com/authlib

Copyright

2013, Hsiaoming Yang. Under BSD-3 license.

View on GitHub
GitHub Stars159
CategoryDevelopment
Updated4d ago
Forks18

Languages

Python

Security Score

100/100

Audited on Mar 25, 2026

No findings