From 5e61d1543247b37bd03aaacd1bfb0b4dda3bdd81 Mon Sep 17 00:00:00 2001 From: timvisee Date: Thu, 5 Jan 2023 17:14:06 +0100 Subject: [PATCH] Do not prefix Steam TOTP account name with Steam --- src/custom_providers.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/custom_providers.rs b/src/custom_providers.rs index 7da52e7..8f9487b 100644 --- a/src/custom_providers.rs +++ b/src/custom_providers.rs @@ -14,7 +14,7 @@ impl TOTP { /// let secret = Secret::Encoded("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".to_string()); /// let totp = TOTP::new_steam(secret.to_bytes().unwrap(), Some("username".to_string())); /// ``` - pub fn new_steam(secret: Vec, account_name: Option) -> TOTP { + pub fn new_steam(secret: Vec, account_name: String) -> TOTP { Self::new_unchecked( Algorithm::Steam, 5, @@ -22,9 +22,7 @@ impl TOTP { 30, secret, Some("Steam".into()), - account_name - .map(|n| format!("Steam:{}", n)) - .unwrap_or_else(|| "".into()), + account_name, ) }