Skip to content

Commit

Permalink
Handle LinkResult of AuthenticatorPresent
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessecar96 committed Jun 29, 2023
1 parent 710bfb0 commit 5dc64d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Steam Desktop Authenticator/LoginForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ private async void btnSteamLogin_Click(object sender, EventArgs e)
linker.PhoneNumber = phoneNumber;
break;

case AuthenticatorLinker.LinkResult.AuthenticatorPresent:
MessageBox.Show("This account already has an authenticator linked. You must remove that authenticator to add SDA as your authenticator.", "Steam Login", MessageBoxButtons.OK, MessageBoxIcon.Error);
break;

case AuthenticatorLinker.LinkResult.FailureAddingPhone:
MessageBox.Show("Failed to add your phone number. Please try again or use a different phone number.", "Steam Login", MessageBoxButtons.OK, MessageBoxIcon.Error);
linker.PhoneNumber = null;
Expand All @@ -208,6 +212,7 @@ private async void btnSteamLogin_Click(object sender, EventArgs e)
MessageBox.Show("Please check your email, and click the link Steam sent you before continuing.", "Steam Login", MessageBoxButtons.OK, MessageBoxIcon.Information);
break;

default:
case AuthenticatorLinker.LinkResult.GeneralFailure:
MessageBox.Show("Error adding your authenticator.", "Steam Login Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.Close();
Expand Down

0 comments on commit 5dc64d6

Please sign in to comment.