Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x “不允许使用InvalidRequest URL查询参数”Django-oauth2 500错误_Python 3.x_Angular_Django Rest Framework_Oauth 2.0_Pkce - Fatal编程技术网

Python 3.x “不允许使用InvalidRequest URL查询参数”Django-oauth2 500错误

Python 3.x “不允许使用InvalidRequest URL查询参数”Django-oauth2 500错误,python-3.x,angular,django-rest-framework,oauth-2.0,pkce,Python 3.x,Angular,Django Rest Framework,Oauth 2.0,Pkce,前缀:我是django的新手 堆栈:oAuth2+PKCE协议,Angular,Django-oAuth2-toolkit+REST 继续获得: oauthlib.oauth2.rfc6749.errors.InvalidRequestError: (invalid_request) URL query parameters are not allowed <oauthlib.Request SANITIZED> 不知道出了什么问题 p.S在django日志中打印请求时,没有任何内

前缀:我是django的新手

堆栈:oAuth2+PKCE协议,Angular,Django-oAuth2-toolkit+REST

继续获得:

oauthlib.oauth2.rfc6749.errors.InvalidRequestError: (invalid_request) URL query parameters are not allowed <oauthlib.Request SANITIZED>
不知道出了什么问题


p.S在django日志中打印请求时,没有任何内容看起来是编码的。质询和验证器正在工作,否则,错误将表明是这样。

发现删除httpParams并将参数添加为body不会抛出错误500。现在我有另一个错误,但请求格式至少更准确

    return this.http.post('http://localhost:8000/o/token/',
  {
    grant_type: 'authorization_code',
    redirect_uri: 'http://localhost:4200/dashboard',
    client_id: 'CLIENT_ID',
    code,
    state,
    verifier
  },
  {
    headers: new HttpHeaders({'Content-Type': 'application/x-www-form-urlencoded'})
  },
);
    return this.http.post('http://localhost:8000/o/token/',
  {
    grant_type: 'authorization_code',
    redirect_uri: 'http://localhost:4200/dashboard',
    client_id: 'CLIENT_ID',
    code,
    state,
    verifier
  },
  {
    headers: new HttpHeaders({'Content-Type': 'application/x-www-form-urlencoded'})
  },
);