Problem authorizing client with django-oAuth-toolkit Authorization Code flow


I have been following the django-oAuth-toolkit documentation. In the Authorization Code step, I have registered an application as shown in the screenshot.

Screenshot given in the documentation

But then the next step is given like this:

To start the Authorization code flow go to this URL which is the same as shown below:

But when I replace my client id and ping that URL it redirects me to the following URL:

I have tried to google that error but it’s such a common keyword that I am unable to find anything that is related to my issue. I am probably missing something obvious, I am new to Python and Django.

Note: In the documentation screenshot there is one form field missing which is there in my local environment. It’s the algorithm field.
Screenshot of my local application


After debugging for so many hours I came to this, please include it in your file and it works. Maybe it is a bug since we defined our app as confidential with authorization_code grant type but oauth_provider is thinking it as public and trying to validate for pkce.

    "PKCE_REQUIRED": False

Answered By – Effortless Python

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published