-
Notifications
You must be signed in to change notification settings - Fork 808
Description
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:
- No OIDC support
- RSA with SHA-2 256
- HMAC with SHA-2 256
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)