private async Task <TokenModel> RetrieveTokenAsync(GetTokenModel model) { var tokenInfo = await _authApi.RetrieveTokenAsync(model); _preferencesService.TokenInfo = tokenInfo; return(tokenInfo); }
private async Task <GetTokenModel> RetrieveTokenAsync(string username, string password, bool rememberMe) { var tokenInfoResponse = await _authApi.RetrieveTokenAsync(username, password, rememberMe); if (string.IsNullOrEmpty(tokenInfoResponse?.AccessToken)) { await ShowErrorAsync("Something went wrong... Login failed."); return(null); } _preferencesService.TokenInfo = tokenInfoResponse; return(_preferencesService.TokenInfo); }