diff --git a/src/App/Pages/Accounts/UpdateTempPasswordPage.xaml b/src/App/Pages/Accounts/UpdateTempPasswordPage.xaml
index ba76573b0..5604d1214 100644
--- a/src/App/Pages/Accounts/UpdateTempPasswordPage.xaml
+++ b/src/App/Pages/Accounts/UpdateTempPasswordPage.xaml
@@ -46,7 +46,7 @@
BackgroundColor="Transparent"
BorderColor="{DynamicResource PrimaryColor}">
@@ -74,6 +74,18 @@
HorizontalTextAlignment="Start" />
+
+
+
+
diff --git a/src/App/Pages/Accounts/UpdateTempPasswordPageViewModel.cs b/src/App/Pages/Accounts/UpdateTempPasswordPageViewModel.cs
index 5bac74d46..18eea7719 100644
--- a/src/App/Pages/Accounts/UpdateTempPasswordPageViewModel.cs
+++ b/src/App/Pages/Accounts/UpdateTempPasswordPageViewModel.cs
@@ -2,6 +2,7 @@
using System.Threading.Tasks;
using Bit.App.Resources;
using Bit.Core.Exceptions;
+using Bit.Core.Models.Domain;
using Bit.Core.Models.Request;
using Xamarin.Forms;
@@ -22,6 +23,35 @@ namespace Bit.App.Pages
public Command ToggleConfirmPasswordCommand { get; }
public Action UpdateTempPasswordSuccessAction { get; set; }
public Action LogOutAction { get; set; }
+ public string CurrentMasterPassword { get; set; }
+ public ForcePasswordResetReason Reason { get; set; } = ForcePasswordResetReason.AdminForcePasswordReset;
+
+ public override async Task InitAsync(bool forceSync = false)
+ {
+ await base.InitAsync(forceSync);
+
+ var forcePasswordResetReason = await _stateService.GetForcePasswordResetReasonAsync();
+
+ if (forcePasswordResetReason.HasValue)
+ {
+ Reason = forcePasswordResetReason.Value;
+ }
+ }
+
+ public bool RequireCurrentPassword
+ {
+ get => Reason == ForcePasswordResetReason.WeakMasterPasswordOnLogin;
+ }
+
+ public string UpdateMasterPasswordWarningText
+ {
+ get
+ {
+ return Reason == ForcePasswordResetReason.WeakMasterPasswordOnLogin
+ ? _i18nService.T("UpdateWeakMasterPasswordWarning")
+ : _i18nService.T("UpdateMasterPasswordWarning");
+ }
+ }
public void TogglePassword()
{
diff --git a/src/App/Resources/AppResources.Designer.cs b/src/App/Resources/AppResources.Designer.cs
index 19717e7ca..9052b0cc6 100644
--- a/src/App/Resources/AppResources.Designer.cs
+++ b/src/App/Resources/AppResources.Designer.cs
@@ -1,4 +1,4 @@
-//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
@@ -1681,6 +1681,15 @@ namespace Bit.App.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Current master password.
+ ///
+ public static string CurrentMasterPass {
+ get {
+ return ResourceManager.GetString("CurrentMasterPass", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Custom.
///
@@ -6419,6 +6428,15 @@ namespace Bit.App.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Your master password does not meet one or more of your organization policies. In order to access the vault, you must update your master password now. Proceeding will log you out of your current session, requiring you to log back in. Active sessions on other devices may continue to remain active for up to one hour..
+ ///
+ public static string UpdateWeakMasterPasswordWarning {
+ get {
+ return ResourceManager.GetString("UpdateWeakMasterPasswordWarning", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Updating password.
///
diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx
index 3f40e4bcd..12e1d26d3 100644
--- a/src/App/Resources/AppResources.resx
+++ b/src/App/Resources/AppResources.resx
@@ -2592,4 +2592,10 @@ Do you want to switch to this account?
Organization SSO identifier required.
+
+ Your master password does not meet one or more of your organization policies. In order to access the vault, you must update your master password now. Proceeding will log you out of your current session, requiring you to log back in. Active sessions on other devices may continue to remain active for up to one hour.
+
+
+ Current master password
+