Skip to content

Commit

Permalink
Add auth error code for locked accounts.
Browse files Browse the repository at this point in the history
  • Loading branch information
PJB3005 committed Aug 8, 2023
1 parent 9275896 commit ee7b82c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions SS14.Launcher/Api/AuthApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ public enum AuthenticateDenyResponseCode
AccountUnconfirmed = 2,
TfaRequired = 3,
TfaInvalid = 4,
AccountLocked = 5,

// Not actually from the API, but used internally.
UnknownError = -1,
Expand Down
4 changes: 3 additions & 1 deletion SS14.Launcher/ViewModels/Login/AuthErrorsOverlayViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ public static string[] AuthCodeToErrors(string[] errors, AuthApi.AuthenticateDen

// Never shown I hope.
AuthApi.AuthenticateDenyResponseCode.TfaRequired => "2-factor authentication required",

AuthApi.AuthenticateDenyResponseCode.TfaInvalid => "2-factor authentication code invalid",

AuthApi.AuthenticateDenyResponseCode.AccountLocked =>
"Account has been locked. Please contact us if you believe this to be in error.",
_ => "Unknown error"
};

Expand Down

0 comments on commit ee7b82c

Please sign in to comment.