Reputation: 3308
Does any one used django-oauth2-provider as django oauth2 solution?
I've clone django-oauth2-provider code from github https://github.com/caffeinehit/django-oauth2-provider, and run the example site provided.
But I don't know how to test it. When I type this in my browser:
http://127.0.0.1:8000/oauth2/authorize/2/?client_id=fc79b3fd7e65b904836b
I got
unauthorized_client An unauthorized client tried to access your resources.
It seems that my client_id had failed passed to the site?
Upvotes: 1
Views: 2566
Reputation: 774
You are accessing the wrong URL:
http://127.0.0.1:8000/oauth2/authorize/?client_id=fc79b3fd7e65b904836b&redirect_uri=<REDIRECT_TARGET>&response_type=code&status=abc
Then the app redirects you to
/oauth2/authorize/2/
by either issuing an HTTP200 upon success or HTTP400 upon failure.
Upvotes: 1