public async Task LoginAsync() { if (!connectivity.IsConnected) { throw new NetworkConnectionException(); } await cloudBackupService.LoginAsync(); settingsFacade.IsLoggedInToBackupService = true; settingsFacade.IsBackupAutouploadEnabled = true; logger.Info("Successfully logged in."); }
public async Task LoginAsync() { if (!connectivity.IsConnected) { throw new NetworkConnectionException(); } await cloudBackupService.LoginAsync(); if (cloudBackupService.UserAccount != null) { UserAccount = cloudBackupService.UserAccount.GetUserAccount(); } settingsFacade.IsLoggedInToBackupService = true; settingsFacade.IsBackupAutouploadEnabled = true; await toastService.ShowToastAsync(Strings.LoggedInMessage, Strings.LoggedInTitle); logger.Info("Successfully logged in."); }
/// <inheritdoc /> public async Task LoginAsync() { if (!connectivity.IsConnected) { throw new NetworkConnectionException(); } try { await cloudBackupService.LoginAsync(); } catch (BackupAuthenticationFailedException ex) { logManager.Error(ex, "Login Failed."); throw; } catch (MsalClientException ex) { logManager.Error(ex, "Login Failed."); throw; } }