geel9 / SteamAuth

A C# library that provides vital Steam Mobile Authenticator functionality
MIT License
276 stars 102 forks source link

Cant generate code. System.FormatException-The input is not a valid Base-64 #89

Closed kwicot closed 2 years ago

kwicot commented 2 years ago

Failed to generate code. I get an exception

System.FormatException: "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."

Code

        AccountDetail detail = Program.AccountsController.AccountsDetail[0];
        string secret = detail.SteamRecoveryKey;
        Debug.WriteLine($"Secret is '{secret}' ");

        SteamAuth.SteamGuardAccount account = new SteamAuth.SteamGuardAccount() { SharedSecret = secret};
        string code = account.GenerateSteamGuardCode();

        Debug.WriteLine($"Code is {code}");

secret is correct R#####. Or am I confusing something and the secret should be different?

kwicot commented 2 years ago

Oh yes, the error appears here image

kwicot commented 2 years ago

Oh, its my fall. Sorry