check authed before checking if token has premium (#1074)

This commit is contained in:
Kyle Spearrin 2020-09-18 15:07:32 -04:00 committed by GitHub
parent 52261f99d7
commit db12cd92b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,6 +124,12 @@ namespace Bit.Core.Services
public async Task<bool> CanAccessPremiumAsync() public async Task<bool> CanAccessPremiumAsync()
{ {
var authed = await IsAuthenticatedAsync();
if (!authed)
{
return false;
}
var tokenPremium = _tokenService.GetPremium(); var tokenPremium = _tokenService.GetPremium();
if (tokenPremium) if (tokenPremium)
{ {