11 releases
| 0.4.2 | Jul 24, 2025 |
|---|---|
| 0.4.1 | Jul 22, 2025 |
| 0.3.5 | Dec 25, 2024 |
| 0.3.3 | Jun 23, 2024 |
| 0.1.0 | Feb 2, 2023 |
#827 in Authentication
530 downloads per month
Used in 3 crates
(2 directly)
22KB
347 lines
another-steam-totp
Provides functionality relating to Steam TOTP. Based on https://github.com/DoctorMcKay/node-steam-totp. Designed to be easy-to-use while providing all necessary features.
Usage
use another_steam_totp::generate_auth_code;
let shared_secret = "000000000000000000000000000=";
let time_offset = None;
// Generates the 5-character time-based one-time password using
// your shared_secret.
let code = generate_auth_code(shared_secret, time_offset).unwrap();
assert_eq!(code.len(), 5);
Features
- Generating 5-character TOTP codes used for authentication with Steam.
- Generating confirmation keys and device IDs used for confirmations.
- Getting the current time offset from Steam's servers in seconds using the Steam Web API (enable
reqwestfeature, orureqfeature for a synchronous version).
Installation
Add this to your Cargo.toml:
[dependencies]
another-steam-totp = "0.4"
Or with reqwest feature:
[dependencies]
another-steam-totp = { version = "0.4", features = ["reqwest"] }
License
Dependencies
~0.8–16MB
~161K SLoC