Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
84a82f0
[PM-1208] Add Device approval options screen. View model waiting for …
andrebispo5 May 17, 2023
8786630
[PM-1208] Add device related api endpoint. Add AccoundDecryptOptions …
andrebispo5 Jun 28, 2023
e164fb9
Merge branch 'feature/pm-1029-tde-login' into feature/pm-1208-f3-options
andrebispo5 Jun 29, 2023
cbbc41b
[PM-1208] Add continue button and not you option
andrebispo5 Jul 3, 2023
6268f07
Merge branch 'feature/pm-1029-tde-login' into feature/pm-1208-f3-options
andrebispo5 Jul 3, 2023
3053eaa
[PM-1379] add DeviceTrustCryptoService with establish trust logic (#2…
jlf0dev Jul 5, 2023
800b4c7
Merge branch 'feature/pm-1029-tde-login' into feature/pm-1208-f3-options
andrebispo5 Jul 10, 2023
58542fd
Merge branch 'master' into feature/pm-1029-tde-login
andrebispo5 Jul 10, 2023
548bd12
Merge branch 'feature/pm-1029-tde-login' into feature/pm-1208-f3-options
andrebispo5 Jul 10, 2023
c2d4fa4
[PM-2583] Answer auth request with mp field as null if doesn't have i…
andrebispo5 Jul 11, 2023
a5df6c0
[PM-2287][PM-2289][PM-2293] Approval Options (#2608)
andrebispo5 Jul 12, 2023
b688b85
[PM-1201] Change timeout actions available based on hasMasterPassword…
andrebispo5 Jul 12, 2023
b5cf9fd
[PM-2731] add user key and master key types
jlf0dev Jul 5, 2023
15d3da6
[PM-2713] add new state for new keys and obsolete old ones
jlf0dev Jul 6, 2023
079e02e
[PM-271] add UserKey and MasterKey support to crypto service
jlf0dev Jul 7, 2023
c161953
[PM-2713] rename key hash to password hash & begin add methods to cry…
jlf0dev Jul 17, 2023
69d38d4
[PM-2713] continue organizing crypto service
jlf0dev Jul 18, 2023
bf28d37
[PM-2713] more updates to crypto service
jlf0dev Jul 18, 2023
515decb
[PM-2713] add new pin methods to state service
jlf0dev Jul 18, 2023
1e30524
[PM-2713] fix signature of GetUserKeyPin
jlf0dev Jul 18, 2023
5ba3fac
[PM-2713] add make user key method to crypto service
jlf0dev Jul 18, 2023
d58f0b2
[PM-2713] refresh pin key when setting user key
jlf0dev Jul 18, 2023
cd4f44e
[PM-2713] use new MakeMasterKey method
jlf0dev Jul 18, 2023
5ed567a
[PM-2713] add toggle method to crypto service for keys
jlf0dev Jul 18, 2023
bdfe806
[PM-2713] converting calls to new crypto service api
jlf0dev Jul 18, 2023
7c664f5
[PM-2713] add migration for pin on lock screens
jlf0dev Jul 19, 2023
7fdc559
[PM-2713] more conversions to new crypto service api
jlf0dev Jul 19, 2023
546bf8d
[PM-2713] convert cipher service and others to crypto service api
jlf0dev Jul 19, 2023
c9a7c29
[PM-2713] More conversions to crypto api
jlf0dev Jul 19, 2023
0ff314f
[PM-2713] use new crypto service api in auth service
jlf0dev Jul 19, 2023
bedbca8
[PM-2713] remove unused cached values in crypto service
jlf0dev Jul 19, 2023
a318385
[PM-2713] set decrypt and set user key in login helper
jlf0dev Jul 20, 2023
c61f9f0
Merge branch 'auth/pm-2713/drop-master-key-dependency' into feature/p…
jlf0dev Jul 20, 2023
73b8d8e
fix bad merge
jlf0dev Jul 20, 2023
da7a196
Update crypto service api call to fix build
jlf0dev Jul 20, 2023
635b6bc
Merge branch 'feature/pm-1029-tde-login' into feature/pm-1208-f3-options
andrebispo5 Jul 20, 2023
c09672f
[PM-1208] Fix app resource file
andrebispo5 Jul 20, 2023
c0688c5
[PM-1208] Fix merge
andrebispo5 Jul 20, 2023
080aabf
[PM-1208] Fix merge
andrebispo5 Jul 20, 2023
f8c9cde
[PM-2713] optimize async code in crypto service
jlf0dev Jul 20, 2023
0da3d25
[PM-2713] rename password hash to master key hash
jlf0dev Jul 20, 2023
813ac84
[PM-2713] fix casting issues and pin
jlf0dev Jul 20, 2023
a2f1ca5
[PM-2713] remove extra comment
jlf0dev Jul 20, 2023
10574a7
[PM-2713] remove broken casting
jlf0dev Jul 20, 2023
dfc7c55
[PM-2297] Login with trusted device (Flow 2) (#2623)
andrebispo5 Jul 27, 2023
c259062
[PM-2289] [PM-2293] TDE Login with device Admin Request (#2642)
andrebispo5 Jul 27, 2023
7562c68
[PM-2713] deconstruct new key pair
jlf0dev Jul 27, 2023
ba6d260
[PM-2713] rename PrivateKey methods to UserPrivateKey on crypto service
jlf0dev Jul 27, 2023
de5113e
[PM-2713] rename PinLockEnum to PinLockType
jlf0dev Jul 27, 2023
6fe8fc3
Merge branch 'master' into feature/pm-1029-tde-login
andrebispo5 Jul 28, 2023
bb5a738
[PM-2713] don't pass user key as param when encrypting
jlf0dev Jul 31, 2023
c2ddbb7
[PM-2713] rename toggle method, don't reset enc user key
jlf0dev Jul 31, 2023
c793260
[PM-2713] pr feedback
jlf0dev Jul 31, 2023
e323e19
[PM-2713] PR feedback
jlf0dev Jul 31, 2023
89a9185
[PM-2713] rename get pin lock type method
jlf0dev Jul 31, 2023
3e87d74
[PM-2713] revert feedback for build
jlf0dev Jul 31, 2023
61aac20
[PM-2713] rename state methods
jlf0dev Aug 1, 2023
b1eb263
[PM-2713] combine makeDataEncKey methods
jlf0dev Aug 1, 2023
7fb89fa
[PM-2713] consolidate attachment key creation
jlf0dev Aug 1, 2023
1e8ed1b
[PM-2713] replace generic with inherited class
jlf0dev Aug 1, 2023
ee0dcd2
rename account keys to be more descriptive
jlf0dev Aug 2, 2023
7878827
Merge branch 'master' into feature/pm-1029-tde-login
andrebispo5 Aug 3, 2023
e076c9f
[PM-2713] add auto unlock key to mobile
jlf0dev Aug 3, 2023
c75bccc
[PM-1208] Add TDE flows for new users (#2655)
andrebispo5 Aug 3, 2023
4fa8d2b
[PM-2713] set user key on set password page
jlf0dev Aug 3, 2023
270a395
[PM-2713] set enc user key during kc onboarding
jlf0dev Aug 3, 2023
c595b16
fix formatting
jlf0dev Aug 3, 2023
e820408
[PM-2713] make method async again
jlf0dev Aug 3, 2023
78004db
[PM-2713] clear service cache when adding new account
jlf0dev Aug 3, 2023
9bddc1d
Merge branch 'auth/pm-2713/drop-master-key-dependency' into feature/p…
jlf0dev Aug 4, 2023
4f62f5e
Fix build after merge
jlf0dev Aug 4, 2023
faa9b1a
[PM-3313] Fix Android SSO Login (#2663)
andrebispo5 Aug 5, 2023
53e3429
[PM-3313] Null email in Approval Options screen (#2664)
andrebispo5 Aug 5, 2023
8221d55
[PM-3320][PM-3321] Fix labels and UI tweaks (#2666)
andrebispo5 Aug 7, 2023
aac66b2
[PM-3337] Fix admin request deny error (#2669)
andrebispo5 Aug 8, 2023
6b2700b
[PM-3342] Not you button logs user out. (#2672)
andrebispo5 Aug 8, 2023
24378d9
[PM-3319] Check for admin request in Lock page (#2668)
andrebispo5 Aug 8, 2023
446b8c2
[PM-2289] Change header title based on auth request type (#2670)
andrebispo5 Aug 8, 2023
e9afc75
[PM-3333] Check for purged admin auth requests (#2671)
andrebispo5 Aug 8, 2023
8205c07
[PM-3341] Vault Timeout Action not persisted correctly (#2673)
andrebispo5 Aug 8, 2023
3b9a9fc
[PM-3357] Fix copy for Login Initiated (#2674)
andrebispo5 Aug 9, 2023
af016cd
[PM-3362] Fix auth request approval (#2675)
andrebispo5 Aug 10, 2023
9001fa1
[PM-3102] Update Master password reprompt to be based on MP instead o…
fedemkr Aug 10, 2023
62b6d21
[PM-2713] Final merge from Key Migration branch to TDE Feature branch…
jlf0dev Aug 10, 2023
9b5cde6
Fix app fresh install user login with master password. (#2676)
andrebispo5 Aug 10, 2023
5f4cd62
[PM-3303] Fix biometric login after key migration (#2679)
andrebispo5 Aug 11, 2023
3f4892f
[PM-3381] Fix TDE login 2FA flow (#2678)
andrebispo5 Aug 11, 2023
b2df06a
[PM-3379] Fix key rotation on trusted device. (#2680)
andrebispo5 Aug 11, 2023
a9368be
Merge commit 'c34d1da6' into temp/tde-master-merge
jlf0dev Aug 13, 2023
4e70ca8
Merge branch 'master' into feature/pm-1029-tde-login
jlf0dev Aug 13, 2023
d183bae
[PM-3381] Update login flows (#2683)
andrebispo5 Aug 14, 2023
afeec41
PM-3385 Fix MP reprompt item level when no MP hash is stored like log…
fedemkr Aug 14, 2023
12f8c7b
PM-3386 Fix MP reprompt / OTP decision to be also based on the master…
fedemkr Aug 14, 2023
9c1a206
PM-3450 Fix has master password with mp key hash check (#2689)
fedemkr Aug 14, 2023
001e08e
[PM-3394] Fix login with device for passwordless approvals (#2686)
jlf0dev Aug 15, 2023
79c2e40
[PM-3462] Handle force password reset on mobile with TDE (#2694)
jlf0dev Aug 16, 2023
ea062fb
[PM-2658] Settings Reorganization Init (#2697)
fedemkr Aug 16, 2023
a63af24
Merge branch 'feature/pm-1029-tde-login' into vault/pm-2658/feature-s…
fedemkr Aug 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Android/MainApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ public MainApplication(IntPtr handle, JniHandleOwnership transer)
ServiceContainer.Register<IDeleteAccountActionFlowExecutioner>("deleteAccountActionFlowExecutioner", deleteAccountActionFlowExecutioner);

var verificationActionsFlowHelper = new VerificationActionsFlowHelper(
ServiceContainer.Resolve<IKeyConnectorService>("keyConnectorService"),
ServiceContainer.Resolve<IPasswordRepromptService>("passwordRepromptService"),
ServiceContainer.Resolve<ICryptoService>("cryptoService"));
ServiceContainer.Resolve<ICryptoService>("cryptoService"),
ServiceContainer.Resolve<IUserVerificationService>());
ServiceContainer.Register<IVerificationActionsFlowHelper>("verificationActionsFlowHelper", verificationActionsFlowHelper);

var accountsManager = new AccountsManager(
Expand Down Expand Up @@ -156,9 +156,9 @@ private void RegisterLocalServices()
messagingService, broadcasterService);
var autofillHandler = new AutofillHandler(stateService, messagingService, clipboardService,
platformUtilsService, new LazyResolve<IEventService>());
var biometricService = new BiometricService(stateService);
var cryptoFunctionService = new PclCryptoFunctionService(cryptoPrimitiveService);
var cryptoService = new CryptoService(stateService, cryptoFunctionService);
var biometricService = new BiometricService(stateService, cryptoService);
var passwordRepromptService = new MobilePasswordRepromptService(platformUtilsService, cryptoService);

ServiceContainer.Register<ISynchronousStorageService>(preferencesStorage);
Expand Down
13 changes: 6 additions & 7 deletions src/Android/Services/BiometricService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
using System.Threading.Tasks;
using Android.OS;
using Android.Security.Keystore;
using Bit.App.Services;
using Bit.Core.Abstractions;
using Bit.Core.Services;
using Java.Security;
using Javax.Crypto;

namespace Bit.Droid.Services
{
public class BiometricService : IBiometricService
public class BiometricService : BaseBiometricService
{
private readonly IStateService _stateService;

private const string KeyName = "com.8bit.bitwarden.biometric_integrity";

private const string KeyStoreName = "AndroidKeyStore";
Expand All @@ -24,14 +23,14 @@ public class BiometricService : IBiometricService

private readonly KeyStore _keystore;

public BiometricService(IStateService stateService)
public BiometricService(IStateService stateService, ICryptoService cryptoService)
: base(stateService, cryptoService)
{
_stateService = stateService;
_keystore = KeyStore.GetInstance(KeyStoreName);
_keystore.Load(null);
}

public async Task<bool> SetupBiometricAsync(string bioIntegritySrcKey = null)
public override async Task<bool> SetupBiometricAsync(string bioIntegritySrcKey = null)
{
if (Build.VERSION.SdkInt >= BuildVersionCodes.M)
{
Expand All @@ -41,7 +40,7 @@ public async Task<bool> SetupBiometricAsync(string bioIntegritySrcKey = null)
return true;
}

public async Task<bool> IsSystemBiometricIntegrityValidAsync(string bioIntegritySrcKey = null)
public override async Task<bool> IsSystemBiometricIntegrityValidAsync(string bioIntegritySrcKey = null)
{
if (Build.VERSION.SdkInt < BuildVersionCodes.M)
{
Expand Down
5 changes: 2 additions & 3 deletions src/App/Abstractions/IPasswordRepromptService.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
using System.Threading.Tasks;
using Bit.Core.Enums;

namespace Bit.App.Abstractions
{
public interface IPasswordRepromptService
{
string[] ProtectedFields { get; }

Task<bool> ShowPasswordPromptAsync();
Task<bool> PromptAndCheckPasswordIfNeededAsync(CipherRepromptType repromptType = CipherRepromptType.Password);

Task<(string password, bool valid)> ShowPasswordPromptAndGetItAsync();

Task<bool> Enabled();
}
}
2 changes: 2 additions & 0 deletions src/App/App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
<Folder Include="Controls\PasswordStrengthProgressBar\" />
<Folder Include="Utilities\Automation\" />
<Folder Include="Utilities\Prompts\" />
<Folder Include="Controls\Settings\" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -444,5 +445,6 @@
<None Remove="Controls\PasswordStrengthProgressBar\" />
<None Remove="Utilities\Automation\" />
<None Remove="Utilities\Prompts\" />
<None Remove="Controls\Settings\" />
</ItemGroup>
</Project>
29 changes: 29 additions & 0 deletions src/App/Controls/ExternalLinkItemView.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ContentView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:controls="clr-namespace:Bit.App.Controls"
x:Class="Bit.App.Controls.ExternalLinkItemView"
xmlns:core="clr-namespace:Bit.Core;assembly=BitwardenCore"
x:Name="_contentView">
<ContentView.GestureRecognizers>
<TapGestureRecognizer Command="{Binding GoToLinkCommand, Mode=OneWay, Source={x:Reference _contentView}}" />
</ContentView.GestureRecognizers>
<StackLayout
Orientation="Horizontal">
<controls:CustomLabel
Text="{Binding Title, Mode=OneWay, Source={x:Reference _contentView}}"
HorizontalOptions="StartAndExpand"
LineBreakMode="TailTruncation" />

<controls:IconLabel
Text="{Binding Source={x:Static core:BitwardenIcons.ShareSquare}}"
TextColor="Black"
HorizontalOptions="End"
VerticalOptions="Center"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{Binding Title, Mode=OneWay, Source={x:Reference _contentView}}" />

</StackLayout>
</ContentView>

31 changes: 31 additions & 0 deletions src/App/Controls/ExternalLinkItemView.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System.Windows.Input;
using Xamarin.Forms;

namespace Bit.App.Controls
{
public partial class ExternalLinkItemView : ContentView
{
public static readonly BindableProperty TitleProperty = BindableProperty.Create(
nameof(Title), typeof(string), typeof(ExternalLinkItemView), null, BindingMode.OneWay);

public static readonly BindableProperty GoToLinkCommandProperty = BindableProperty.Create(
nameof(GoToLinkCommand), typeof(ICommand), typeof(ExternalLinkItemView));

public ExternalLinkItemView()
{
InitializeComponent();
}

public string Title
{
get { return (string)GetValue(TitleProperty); }
set { SetValue(TitleProperty, value); }
}

public ICommand GoToLinkCommand
{
get => GetValue(GoToLinkCommandProperty) as ICommand;
set => SetValue(GoToLinkCommandProperty, value);
}
}
}
25 changes: 25 additions & 0 deletions src/App/Controls/Settings/BaseSettingControlView.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Xamarin.Forms;

namespace Bit.App.Controls
{
public class BaseSettingItemView : ContentView
{
public static readonly BindableProperty TitleProperty = BindableProperty.Create(
nameof(Title), typeof(string), typeof(SwitchItemView), null, BindingMode.OneWay);

public static readonly BindableProperty SubtitleProperty = BindableProperty.Create(
nameof(Subtitle), typeof(string), typeof(SwitchItemView), null, BindingMode.OneWay);

public string Title
{
get { return (string)GetValue(TitleProperty); }
set { SetValue(TitleProperty, value); }
}

public string Subtitle
{
get { return (string)GetValue(SubtitleProperty); }
set { SetValue(SubtitleProperty, value); }
}
}
}
19 changes: 19 additions & 0 deletions src/App/Controls/Settings/SettingChooserItemView.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<controls:BaseSettingItemView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:controls="clr-namespace:Bit.App.Controls"
x:Class="Bit.App.Controls.SettingChooserItemView"
x:Name="_contentView"
ControlTemplate="{StaticResource SettingControlTemplate}">
<controls:BaseSettingItemView.GestureRecognizers>
<TapGestureRecognizer Command="{Binding ChooseCommand, Mode=OneWay, Source={x:Reference _contentView}}" />
</controls:BaseSettingItemView.GestureRecognizers>

<controls:CustomLabel
Text="{Binding DisplayValue, Source={x:Reference _contentView}}"
HorizontalTextAlignment="End"
TextColor="{DynamicResource MutedColor}"
StyleClass="list-sub" />

</controls:BaseSettingItemView>
31 changes: 31 additions & 0 deletions src/App/Controls/Settings/SettingChooserItemView.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System.Windows.Input;
using Xamarin.Forms;

namespace Bit.App.Controls
{
public partial class SettingChooserItemView : BaseSettingItemView
{
public static readonly BindableProperty DisplayValueProperty = BindableProperty.Create(
nameof(DisplayValue), typeof(string), typeof(SettingChooserItemView), null, BindingMode.OneWay);

public static readonly BindableProperty ChooseCommandProperty = BindableProperty.Create(
nameof(ChooseCommand), typeof(ICommand), typeof(ExternalLinkItemView));

public string DisplayValue
{
get { return (string)GetValue(DisplayValueProperty); }
set { SetValue(DisplayValueProperty, value); }
}

public SettingChooserItemView()
{
InitializeComponent();
}

public ICommand ChooseCommand
{
get => GetValue(ChooseCommandProperty) as ICommand;
set => SetValue(ChooseCommandProperty, value);
}
}
}
23 changes: 23 additions & 0 deletions src/App/Controls/Settings/SwitchItemView.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<controls:BaseSettingItemView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:controls="clr-namespace:Bit.App.Controls"
x:Class="Bit.App.Controls.SwitchItemView"
x:Name="_contentView"
ControlTemplate="{StaticResource SettingControlTemplate}">
<controls:BaseSettingItemView.GestureRecognizers>
<TapGestureRecognizer Tapped="ContentView_Tapped" />
</controls:BaseSettingItemView.GestureRecognizers>

<Switch
x:Name="_switch"
Grid.Column="1"
Grid.RowSpan="2"
IsToggled="{Binding IsToggled, Mode=TwoWay, Source={x:Reference _contentView}}"
HorizontalOptions="End"
VerticalOptions="Center"
AutomationId="{Binding SwitchAutomationId, Mode=OneWay, Source={x:Reference _contentView}}"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{Binding Title, Mode=OneWay, Source={x:Reference _contentView}}"/>
</controls:BaseSettingItemView>
45 changes: 45 additions & 0 deletions src/App/Controls/Settings/SwitchItemView.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System.Windows.Input;
using Xamarin.Forms;

namespace Bit.App.Controls
{
public partial class SwitchItemView : BaseSettingItemView
{
public static readonly BindableProperty IsToggledProperty = BindableProperty.Create(
nameof(IsToggled), typeof(bool), typeof(SwitchItemView), null, BindingMode.TwoWay);

public static readonly BindableProperty SwitchAutomationIdProperty = BindableProperty.Create(
nameof(SwitchAutomationId), typeof(string), typeof(SwitchItemView), null, BindingMode.OneWay);

public static readonly BindableProperty ToggleSwitchCommandProperty = BindableProperty.Create(
nameof(ToggleSwitchCommand), typeof(ICommand), typeof(ExternalLinkItemView));

public SwitchItemView()
{
InitializeComponent();
}

public bool IsToggled
{
get { return (bool)GetValue(IsToggledProperty); }
set { SetValue(IsToggledProperty, value); }
}

public string SwitchAutomationId
{
get { return (string)GetValue(SwitchAutomationIdProperty); }
set { SetValue(SwitchAutomationIdProperty, value); }
}

public ICommand ToggleSwitchCommand
{
get => GetValue(ToggleSwitchCommandProperty) as ICommand;
set => SetValue(ToggleSwitchCommandProperty, value);
}

void ContentView_Tapped(System.Object sender, System.EventArgs e)
{
_switch.IsToggled = !_switch.IsToggled;
}
}
}
4 changes: 2 additions & 2 deletions src/App/Pages/Accounts/LockPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<StackLayout StyleClass="box">
<Grid
StyleClass="box-row"
IsVisible="{Binding PinLock}"
IsVisible="{Binding PinEnabled}"
Padding="0, 10, 0, 0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand Down Expand Up @@ -89,7 +89,7 @@
<Grid
x:Name="_passwordGrid"
StyleClass="box-row"
IsVisible="{Binding PinLock, Converter={StaticResource inverseBool}}"
IsVisible="{Binding PinEnabled, Converter={StaticResource inverseBool}}"
Padding="0, 10, 0, 0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
Expand Down
11 changes: 6 additions & 5 deletions src/App/Pages/Accounts/LockPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ public partial class LockPage : BaseContentPage
private bool _promptedAfterResume;
private bool _appeared;

public LockPage(AppOptions appOptions = null, bool autoPromptBiometric = true)
public LockPage(AppOptions appOptions = null, bool autoPromptBiometric = true, bool checkPendingAuthRequests = true)
{
_appOptions = appOptions;
_autoPromptBiometric = autoPromptBiometric;
InitializeComponent();
_broadcasterService = ServiceContainer.Resolve<IBroadcasterService>();
_vm = BindingContext as LockPageViewModel;
_vm.CheckPendingAuthRequests = checkPendingAuthRequests;
_vm.Page = this;
_vm.UnlockedAction = () => Device.BeginInvokeOnMainThread(async () => await UnlockedAsync());

Expand All @@ -44,7 +45,7 @@ public Entry SecretEntry
{
get
{
if (_vm?.PinLock ?? false)
if (_vm?.PinEnabled ?? false)
{
return _pin;
}
Expand All @@ -54,7 +55,7 @@ public Entry SecretEntry

public async Task PromptBiometricAfterResumeAsync()
{
if (_vm.BiometricLock)
if (_vm.BiometricEnabled)
{
await Task.Delay(500);
if (!_promptedAfterResume)
Expand Down Expand Up @@ -91,13 +92,13 @@ protected override async void OnAppearing()

_vm.FocusSecretEntry += PerformFocusSecretEntry;

if (!_vm.BiometricLock)
if (!_vm.BiometricEnabled)
{
RequestFocus(SecretEntry);
}
else
{
if (_vm.UsingKeyConnector && !_vm.PinLock)
if (!_vm.HasMasterPassword && !_vm.PinEnabled)
{
_passwordGrid.IsVisible = false;
_unlockButton.IsVisible = false;
Expand Down
Loading