Skip to content

Commit

Permalink
For accounts that haven't ever logged into our authenticator applicat…
Browse files Browse the repository at this point in the history
…ion, we check that this condition to ensure that we don't do a further undefined value fetch
  • Loading branch information
HilliamT committed Jan 3, 2021
1 parent 1fccb0c commit d25af5f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/steam/authenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export async function attemptLogin(details: SteamLoginDetails): Promise<SteamLog
if (details.accountName == "" || details.password == "") return resolve({error: SteamLoginErrors.MissingDetails});

// If we have their shared secret stored on disk, generate mobile auth code to login with
if (account.secrets && account.secrets.shared_secret) details.twoFactorCode = getAuthCode(account.secrets.shared_secret);
if (account && account.secrets && account.secrets.shared_secret)
details.twoFactorCode = getAuthCode(account.secrets.shared_secret);

// Begin login process
community.login(details, (error, sessionID, cookies, steamguard, oAuthToken) => {
Expand Down

0 comments on commit d25af5f

Please sign in to comment.