Example #1
0
        public async Task LoginAsync()
        {
            if (!connectivity.IsConnected)
            {
                throw new NetworkConnectionException();
            }

            await cloudBackupService.LoginAsync();

            settingsFacade.IsLoggedInToBackupService = true;
            settingsFacade.IsBackupAutouploadEnabled = true;

            logger.Info("Successfully logged in.");
        }
Example #2
0
        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.");
        }
Example #3
0
        /// <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;
            }
        }