From 18bda6dfd156ae1e31423e4438c5b262b9a1ce35 Mon Sep 17 00:00:00 2001 From: winkidney Date: Fri, 18 Feb 2022 21:37:18 -0800 Subject: [PATCH] Fix: Should enable token auth in DRF --- pinry/settings/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pinry/settings/base.py b/pinry/settings/base.py index 0bf2cf2..db6e399 100644 --- a/pinry/settings/base.py +++ b/pinry/settings/base.py @@ -164,4 +164,8 @@ REST_FRAMEWORK = { 'URL_FIELD_NAME': DRF_URL_FIELD_NAME, 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', 'PAGE_SIZE': API_LIMIT_PER_PAGE, + 'DEFAULT_AUTHENTICATION_CLASSES': [ + 'rest_framework.authentication.TokenAuthentication', + 'rest_framework.authentication.SessionAuthentication', + ] }