Django oauth toolkit using implicit grant type

I am trying to allow my users to use a third-party angularjs application against the python / django backend using oauth toolkit. Using the implicit "grant type", I always get a redirect with the parameter "? Error = unauthorized_client", although the username and password were correct. I tried using the "authorization code" without any problems. Any suggestions?

+4
source share
2 answers

From the OAuth2 spec in the implicit permission section (4.2.2.1):

unauthorized_client

.

, .

+2

, Oauth, grant_type = . , , , HTML.

<form id="user_form" method="get" action="Your Oauth Authorize URL" 
enctype="multipart/form-data">

Client_id: <input type="text" name="client_id" value="" size="100" />
<br />

Redirect Ui:<input type="text" name="redirect_uri" value="Your redirect_uri">
<br />

<input type="hidden" name="response_type" value="token">
{% csrf_token %}

<input type="submit" value="submit" />

, , :

  • :
  • :
  • Uri: uri

Oauth, .

, URL , Uri:

HTTP:// YourRedirectUri/# expires_in = ExpirationTime & = & token_type = & = & access_token = VALUEOFTHETOKEN

0

Source: https://habr.com/ru/post/1569000/


All Articles