#totp #steam

another-steam-totp

Implementation of Steam time-based one-time password

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

Download history 314/week @ 2026-02-12 116/week @ 2026-02-19 126/week @ 2026-02-26 98/week @ 2026-03-05 118/week @ 2026-03-12 106/week @ 2026-03-19 13/week @ 2026-03-26 77/week @ 2026-04-02 153/week @ 2026-04-09 172/week @ 2026-04-16 114/week @ 2026-04-23 102/week @ 2026-04-30 297/week @ 2026-05-07 129/week @ 2026-05-14 40/week @ 2026-05-21 39/week @ 2026-05-28

530 downloads per month
Used in 3 crates (2 directly)

MIT license

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 reqwest feature, or ureq feature 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

MIT

Dependencies

~0.8–16MB
~161K SLoC