Where does Django-oauth-toolkit store the client_id and client_secret?

902 Views Asked by At

When an application is created and issued a client_id and client_secret using django-oauth-tookit where does it store the client_id and client_secret? How can I manually retrieve/create them?

1

There are 1 best solutions below

0
On

In your auth provider backend, you can access them using something like:

from oauth2_provider.models import Application

my_app = Application.objects.get(...)
my_app.client_id
my_app.client_secret

Alternatively, you can also navigate to the corresponding page in the Django admin:

Example Django admin page for oauth toolkit application.