示例#1
0
        private async Task LoginWithAccessToken([NotNull] Credentials credentials)
        {
            _log.Write(LogLevel.Debug, "Logging in with access token");
            _github.Credentials = credentials;

            try
            {
                SettingsCache.SaveToken(credentials.GetToken());
                Token = credentials.GetToken();
                await LoadData();
            }
            catch (Exception ex)
            {
                _log.Write(LogLevel.Warn, "Failed to login", ex);
                Logout();
                throw;
            }
        }