Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/App/Pages/Accounts/LoginSsoPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ private void Close_Clicked(object sender, EventArgs e)
private async Task StartTwoFactorAsync()
{
RestoreAppOptionsFromCopy();
var page = new TwoFactorPage(true, _appOptions);
var page = new TwoFactorPage(true, _appOptions, _vm.OrgIdentifier);
await Navigation.PushModalAsync(new NavigationPage(page));
}

private async Task StartSetPasswordAsync()
{
RestoreAppOptionsFromCopy();
var page = new SetPasswordPage(_appOptions);
var page = new SetPasswordPage(_appOptions, _vm.OrgIdentifier);
await Navigation.PushModalAsync(new NavigationPage(page));
}

Expand Down
3 changes: 2 additions & 1 deletion src/App/Pages/Accounts/SetPasswordPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public partial class SetPasswordPage : BaseContentPage
private readonly SetPasswordPageViewModel _vm;
private readonly AppOptions _appOptions;

public SetPasswordPage(AppOptions appOptions = null)
public SetPasswordPage(AppOptions appOptions = null, string orgIdentifier = null)
{
_messagingService = ServiceContainer.Resolve<IMessagingService>("messagingService");
_messagingService.Send("showStatusBar", true);
Expand All @@ -29,6 +29,7 @@ public SetPasswordPage(AppOptions appOptions = null)
_messagingService.Send("showStatusBar", false);
await Navigation.PopModalAsync();
};
_vm.OrgIdentifier = orgIdentifier;
if (Device.RuntimePlatform == Device.Android)
{
ToolbarItems.RemoveAt(0);
Expand Down
2 changes: 2 additions & 0 deletions src/App/Pages/Accounts/SetPasswordPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public MasterPasswordPolicyOptions Policy
public string Hint { get; set; }
public Action SetPasswordSuccessAction { get; set; }
public Action CloseAction { get; set; }
public string OrgIdentifier { get; set; }

public async Task InitAsync()
{
Expand Down Expand Up @@ -158,6 +159,7 @@ await Page.DisplayAlert(AppResources.AnErrorHasOccurred,
MasterPasswordHint = Hint,
Kdf = kdf,
KdfIterations = kdfIterations,
OrgIdentifier = OrgIdentifier,
Keys = new KeysRequest
{
PublicKey = keys.Item1,
Expand Down
6 changes: 4 additions & 2 deletions src/App/Pages/Accounts/TwoFactorPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ public partial class TwoFactorPage : BaseContentPage
private TwoFactorPageViewModel _vm;
private bool _inited;
private bool _authingWithSso;
private string _orgIdentifier;

public TwoFactorPage(bool? authingWithSso = false, AppOptions appOptions = null)
public TwoFactorPage(bool? authingWithSso = false, AppOptions appOptions = null, string orgIdentifier = null)
{
InitializeComponent();
SetActivityIndicator();
_authingWithSso = authingWithSso ?? false;
_appOptions = appOptions;
_orgIdentifier = orgIdentifier;
_storageService = ServiceContainer.Resolve<IStorageService>("storageService");
_broadcasterService = ServiceContainer.Resolve<IBroadcasterService>("broadcasterService");
_messagingService = ServiceContainer.Resolve<IMessagingService>("messagingService");
Expand Down Expand Up @@ -170,7 +172,7 @@ private void TryAgain_Clicked(object sender, EventArgs e)
private async Task StartSetPasswordAsync()
{
_vm.CloseAction();
var page = new SetPasswordPage(_appOptions);
var page = new SetPasswordPage(_appOptions, _orgIdentifier);
await Navigation.PushModalAsync(new NavigationPage(page));
}

Expand Down
1 change: 1 addition & 0 deletions src/Core/Models/Request/SetPasswordRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public class SetPasswordRequest
public KeysRequest Keys { get; set; }
public KdfType Kdf { get; set; }
public int KdfIterations { get; set; }
public string OrgIdentifier { get; set; }
}
}