From ee7b82ca3a1dc7f8ce681fdc5f1c143e10d8d4a6 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Wed, 9 Aug 2023 00:06:21 +0200 Subject: [PATCH] Add auth error code for locked accounts. --- SS14.Launcher/Api/AuthApi.cs | 1 + SS14.Launcher/ViewModels/Login/AuthErrorsOverlayViewModel.cs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/SS14.Launcher/Api/AuthApi.cs b/SS14.Launcher/Api/AuthApi.cs index 0dd76ad4..6a9a92a7 100644 --- a/SS14.Launcher/Api/AuthApi.cs +++ b/SS14.Launcher/Api/AuthApi.cs @@ -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, diff --git a/SS14.Launcher/ViewModels/Login/AuthErrorsOverlayViewModel.cs b/SS14.Launcher/ViewModels/Login/AuthErrorsOverlayViewModel.cs index b604bd89..e155cac7 100644 --- a/SS14.Launcher/ViewModels/Login/AuthErrorsOverlayViewModel.cs +++ b/SS14.Launcher/ViewModels/Login/AuthErrorsOverlayViewModel.cs @@ -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" };