Unable to use OAUTH2 Django

I'm following this tutorial https://django-oauth-toolkit.readthedocs.io/en/latest/tutorial/tutorial_01.html, and unfortunately I'm stuck in this part

"Point your browser to //localhost:8000/o/applications/ and add an Application instance"

unfortunately when I go to that URL, I get the following error and redirected to

"localhost:8000/accounts/login/?next=/o/applications/"

and page not found error, is there something I'm doing wrong?

Upvotes: 0

Views: 832

Answers (1)

clockwatcher
clockwatcher

Reputation: 3363

The guide doesn't mention it but you need an authenticated session before you can access that page. Add the following steps:

Create a user:

python manage.py createsuperuser

Start up the django server:

python manage.py runserver

Get a validated session by logging into the admin page with the admin account that you just created:

http://localhost:8000/admin

Then navigate to the page the guide references:

http://localhost:8000/o/applications/

Upvotes: 5

Related Questions