Python 3.x “不允许使用InvalidRequest URL查询参数”Django-oauth2 500错误
前缀:我是django的新手 堆栈:oAuth2+PKCE协议,Angular,Django-oAuth2-toolkit+REST 继续获得: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日志中打印请求时,没有任何内
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'})
},
);