'Returns True if there are valid credentials for the current user.'

def has_credentials(self):

    if (not self.credentials):
        return False
    elif (self.credentials.access_token_expired and (not self.credentials.refresh_token)):
        return False
    else:
        return True
