diff --git a/oidc_provider/views.py b/oidc_provider/views.py index 72d941e2..6b66f9bc 100644 --- a/oidc_provider/views.py +++ b/oidc_provider/views.py @@ -65,7 +65,7 @@ def get(self, request, *args, **kwargs): try: authorize.validate_params() - if request.user.is_authenticated(): + if (request.user.is_authenticated if django.VERSION >= (1, 10) else request.user.is_authenticated()): # Check if there's a hook setted. hook_resp = settings.get('OIDC_AFTER_USERLOGIN_HOOK', import_str=True)( request=request, user=request.user,