if (scope) {
      if (typeof scope !== 'string') {
        return next(new TokenError('Invalid parameter: scope must be a string', 'invalid_request'));
      }