-
-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't make tutorial "getting started" , django-oauth-toolkit 2.0.0 #1178
Comments
@vebp Oh wow, I didn't even know (remember?) there was an http://127.0.0.1:8000/o/applications/register/ endpoint. (I've never followed the tutorial apparently!) I always use the admin UI at http://127.0.0.1:8000/admin/oauth2_provider/application/add/. I'll have to look over the tutorial, but meanwhile, can you try using the admin endpoint? Also 2.1.0 was just published. Also the Algorithm selection should be "No OIDC support". See this screenshot: I can't comment on the code challenge other than to suggest you try using Postman first as in this screen shot, selecting "Authorization Code (With PKCE)": Also, make sure your Application includes this redirect URI: |
OK @n2ygk thanks a lot!, I'll try to do that. |
* Add 'code_verifier' parameter to token request Fixes #1178 * Address feedback
I've tested twice the getting started doc and end up with the same error any idea? Setup: |
@tartarini @n2ygk I had a similar problem. My problem was that I thought code_verifier and code_challenge were the same thing. |
hi good day
I can't make work the tutorial "getting started" from the docs
(sorry I know there are a couple of similars issues rised but still it seems there is some differences)
Django 4.0.5
django-oauth-toolkit 2.0.0
OS Ubuntu 20.04
python 3.8
I've been following the steps as appears in the docs but at the end the system delivers me the line
{"error": "invalid_request", "error_description": "Code verifier required."}
instead of the expected:
These where my steps:
BTW, when you enters the url
http://127.0.0.1:8000/o/applications/register/
the form has another field called "Algorithm" with 3 options:
Which option should I choose at this step? The docs do not refers to it.
I tried with the first and the third but the steps didn't work with any of them. The second option gives me this strange error when I try to selected it.
Finally, and don't know if it was important, but when I tried to create the code_challenge, I had to change the line
code_verifier = base64.urlsafe_b64encode(code_verifier)
to
code_verifier = base64.urlsafe_b64encode(code_verifier.encode('utf-8'))
because I had an error that requests me to use a string.
Later the line
code_challenge = hashlib.sha256(code_verifier.encode('utf-8')).digest()
had to change to
code_challenge = hashlib.sha256(code_verifier).digest()
What am I doing wrong?
(Thanks in advance)
The text was updated successfully, but these errors were encountered: