Skip to content

Commit

Permalink
fix(esn-accounts): fix csrf fail for safari [closes #228]
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoeejoee committed Nov 10, 2023
1 parent 1c3e21c commit 90bd662
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fiesta/apps/esnaccounts/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

from allauth_cas.views import CASAdapter, CASCallbackView, CASLoginView, CASLogoutView
from django.views.decorators.csrf import csrf_exempt

from .provider import ESNAccountsProvider

Expand All @@ -13,6 +14,7 @@ class ESNAccountsAdapter(CASAdapter):

login = CASLoginView.adapter_view(ESNAccountsAdapter)

callback = CASCallbackView.adapter_view(ESNAccountsAdapter)
# see https://github.com/esnvutbrno/buena-fiesta/issues/228
callback = csrf_exempt(CASCallbackView.adapter_view(ESNAccountsAdapter))

logout = CASLogoutView.adapter_view(ESNAccountsAdapter)

0 comments on commit 90bd662

Please sign in to comment.