Link and activate a new mobile authenticator
masterTo add a mobile authenticator to a Steam account, follow these steps:
- Use
UserLoginto log into the target account. - Instantiate an
AuthenticatorLinker. - Call
AuthenticatorLinker.AddAuthenticator(). - CRITICAL: Immediately after calling
AddAuthenticator(), but before callingFinalizeAddAuthenticator(), you must save the JSON string ofAuthenticatorLinker.LinkedAccount. This object contains the necessary data to generate future codes. Failure to save this data will result in being locked out of the account. - Call
AuthenticatorLinker.FinalizeAddAuthenticator()to complete the process.
// 1. Login
var login = new UserLogin();
// ... perform login logic ...
// 2. Link Authenticator
var linker = new AuthenticatorLinker();
linker.AddAuthenticator();
// 3. CRITICAL: Save the LinkedAccount JSON now!
string importantData = linker.LinkedAccount; // Save this string to a database/file
// 4. Finalize
linker.FinalizeAddAuthenticator();