code: def add_code_challenge(request_args, service, **kwargs):
      
      try:
          cv_len = service.service_context.config['code_challenge']['length']
      except KeyError:
          cv_len = 64  # Use default
  
      # code_verifier: string of length cv_len
      code_verifier = unreserved(cv_len)
      _cv = code_verifier.encode()
  
      try:
          _method = service.service_context.config['code_challenge']['method']
      except KeyError:
          _method = 'S256'
  
      try:
          # Pick hash method
          _hash_method = CC_METHOD[_method]
          # Use it on the code_verifier
          _hv = _hash_method(_cv).digest()
          # base64 encode the hash value
          code_challenge = b64e(_hv).decode('ascii')
      except KeyError:
          raise Unsupported(
              'PKCE Transformation method:{}'.format(_method))
  
      _item = Message(code_verifier=code_verifier,code_challenge_method=_method)
      service.store_item(_item, 'pkce', request_args['state'])
  
      request_args.update({"code_challenge": code_challenge,
                           "code_challenge_method": _method})
      return request_args
docs: PKCE RFC 7636 support
      To be added as a post_construct method to an
      :py:class:`oidcservice.oidc.service.Authorization` instance
  
      :param service: The service that uses this function
      :param request_args: Set of request arguments
      :param kwargs: Extra set of keyword arguments
      :return: Updated set of request arguments