public async Task <Auth> AuthenticateAsync(UserLogin userLogin) { try { await ClearAuthenticationAsync(); await _applicationData.SetTenantIdAsync(userLogin.TenantId); var auth = await _httpManager.PostAsync <Auth>("userApi/Authentication", userLogin); await _applicationData.SetAuthAsync(auth); await _applicationData.SetTenantIdAsync(userLogin.TenantId); return(auth); } catch { await ClearAuthenticationAsync(); throw; } }