diff --git a/accounts/views.py b/accounts/views.py index 0caf38f..a03975c 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -7,7 +7,9 @@ from django.shortcuts import get_object_or_404, redirect from django.urls import reverse from django.utils import timezone +from django.utils.decorators import method_decorator from django.views import View +from django.views.decorators.csrf import csrf_exempt from requests_oauthlib import OAuth2Session from accounts.models import AccessToken, RefreshToken @@ -116,6 +118,7 @@ def get(self, request): return redirect(return_to) +@method_decorator(csrf_exempt, name="dispatch") class TokenView(View): """ View for token-based authentication, specifically for mobile products that diff --git a/pyproject.toml b/pyproject.toml index 22eccc4..92d4718 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "django-labs-accounts" -version = "0.9.1" +version = "0.9.2" description = "Reusable Django app for Penn Labs accounts" authors = ["Penn Labs "] license = "MIT"