{"id":71778,"library":"google-authenticator","title":"Google Authenticator","description":"Interact with the Google Authenticator mobile app for 2-factor-authentication.","status":"active","version":"0.4.2","language":"rust","source_language":null,"source_url":"https://github.com/hanskorg/google-authenticator-rust","tags":["2fa","authentication","google-authenticator","totp"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\ngoogle-authenticator = \"0.4.2\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add google-authenticator","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"GoogleAuthenticator","correct":"use google_authenticator::GoogleAuthenticator;"}],"quickstart":{"code":"use google_authenticator::GoogleAuthenticator;\n\nlet auth = GoogleAuthenticator::new();\nlet secret = auth.create_secret(32);\nlet code = auth.get_code(&secret, 30)?;\nprintln!(\"2FA code: {}\", code);","lang":"rust","description":"Generate a secret and get a time-based one-time password."},"warnings":[{"fix":"Add `features = [\"time\"]` to Cargo.toml dependency.","message":"Requires the `time` feature for time-based codes.","severity":"gotcha","affected_versions":">=0.4.0"}],"env_vars":null,"search_vec":"'2':11 '2fa':15 'app':9 'authent':2,7,14,16,19 'factor':13 'factor-authent':12 'googl':1,6,18 'google-authent':17 'interact':3 'mobil':8 'totp':20","created_at":"2026-06-17T18:31:18.866561+00:00","updated_at":"2026-06-17T18:31:18.866561+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/hanskorg/google-authenticator-rust.git","github":"https://github.com/hanskorg/google-authenticator-rust","docs":"https://docs.rs/google-authenticator/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["auth"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}