mirror of
https://github.com/bitwarden/mobile
synced 2025-12-12 14:23:26 +00:00
[SG-174] Login with Device Request - Mobile (#2167)
* [SG-174] Add new login request services to Api * [SG-174] Fix typo * [SG-174] Enable login with device button. * [SG-174] Add new login request page and viewmodel * [SG-174] Add new text resources * [SG-174] Add new RSA Decrypt method with string param * [SG-174] Change create login request method * [SG-174] Add new method to auth service to login passwordless * [SG-174] Refactor login helper method to work with passwordless * [SG-174] Fix service registration * [SG-174] Update token request to support passwordless * [SG-174] Update Api service with passwordless methods * [SG-174] Fix App csproj references * [SG-174] Remove unnecessary argument * [SG-174] dotnet format * [SG-174] Fixed iOS Extensions * [SG-174] Change Command to ICommand * [SG-174] Change Gesture Recognizer to Command * [SG-174] Fix close action * [SG-174] Code format * [SG-174] Fix android frame shadow bug * [SG-174] PR fixes
This commit is contained in:
@@ -339,10 +339,8 @@ namespace Bit.iOS.ShareExtension
|
||||
vm.StartTwoFactorAction = () => DismissAndLaunch(() => LaunchTwoFactorFlow(false));
|
||||
vm.UpdateTempPasswordAction = () => DismissAndLaunch(() => LaunchUpdateTempPasswordFlow());
|
||||
vm.StartSsoLoginAction = () => DismissAndLaunch(() => LaunchLoginSsoFlow());
|
||||
vm.LogInSuccessAction = () =>
|
||||
{
|
||||
DismissLockAndContinue();
|
||||
};
|
||||
vm.LogInWithDeviceAction = () => DismissAndLaunch(() => LaunchLoginWithDevice(email));
|
||||
vm.LogInSuccessAction = () => { DismissLockAndContinue(); };
|
||||
vm.CloseAction = () => DismissAndLaunch(() => LaunchHomePage(checkRememberedEmail: false));
|
||||
}
|
||||
NavigateToPage(loginPage);
|
||||
@@ -350,6 +348,22 @@ namespace Bit.iOS.ShareExtension
|
||||
LogoutIfAuthed();
|
||||
}
|
||||
|
||||
private void LaunchLoginWithDevice(string email = null)
|
||||
{
|
||||
var loginWithDevicePage = new LoginPasswordlessRequestPage(email, _appOptions.Value);
|
||||
SetupAppAndApplyResources(loginWithDevicePage);
|
||||
if (loginWithDevicePage.BindingContext is LoginPasswordlessRequestViewModel vm)
|
||||
{
|
||||
vm.StartTwoFactorAction = () => DismissAndLaunch(() => LaunchTwoFactorFlow(false));
|
||||
vm.UpdateTempPasswordAction = () => DismissAndLaunch(() => LaunchUpdateTempPasswordFlow());
|
||||
vm.LogInSuccessAction = () => { DismissLockAndContinue(); };
|
||||
vm.CloseAction = () => DismissAndLaunch(() => LaunchHomePage());
|
||||
}
|
||||
NavigateToPage(loginWithDevicePage);
|
||||
|
||||
LogoutIfAuthed();
|
||||
}
|
||||
|
||||
private void LaunchLoginSsoFlow()
|
||||
{
|
||||
var loginPage = new LoginSsoPage();
|
||||
|
||||
Reference in New Issue
Block a user