Files
website-v2/core/oauthhelper.py
Lacey Williams Henschel 10298f3ceb Add django-auth-toolkit
- Add task to clear expired oauth tokens
- Add setting for oauth app name
- Add docs
2024-01-23 15:23:34 -08:00

11 lines
237 B
Python

from django.conf import settings
from oauth2_provider.models import Application
def get_oauth_client():
try:
return Application.objects.get(name=settings.OAUTH_APP_NAME)
except Application.DoesNotExist:
return