public bool LoggedIn()
{
if (Auth.IsAccessTokenValid())
{
return true;
}
if (Auth.IsRefreshTokenValid())
{
//obtain a mutual-exclusion lock for the thisLock object, execute statement and then release the lock.
lock (refreshLock)
{
Refresh();
return true;
}
}
return false;
}