public virtual async Task <(Login, User)> AddCurrentUserIfNeeded()
        {
            var credentials = _credentialsGetter.GetCuurentUser();

            if (credentials is null)
            {
                return(null, null);
            }
            else
            {
                return(await AddUserIfNotExisted(Guid.Parse(credentials.TokenId), credentials.UserId, credentials.AccessToken));
            }
        }
        public bool IsAuthorized(Expression <Func <T, bool> > identifiengEntityExpression, Expression <Func <T, User> > toUser)
        {
            var currentUser = _credentialsGetter.GetCuurentUser();

            if (currentUser is null)
            {
                return(false);
            }

            var entity = _repo.Table.Where(identifiengEntityExpression).Select(toUser).Where(u => u.UserId.ToString() == currentUser.UserId);

            if (entity.Any())
            {
                return(true);
            }
            return(false);
        }