Django IsAuthenticated views always return 403

I have various views and viewsets, when I add the IsAuthenticated permission class I always get the 403 forbidden error Response

{
    "detail": "You do not have permission to perform this action."
}

In views

@api_view(["GET"])
@permission_classes([IsAuthenticated])
def protected_profile(request):

In viewsets

permission_classes = [IsAuthenticated]

When I remove this class my requests work

I've even checked if request.user.is_authenticated it returns true. It was working few hours back, I've reverted to previous git commits and now the problem continues to persist, my JWT is right as well. I'm on Django 3.2.3 and channels 3.0.3 if that helps. Any help would be appreciated.

Edit: the same deployment works fine on heroku. So, I've dropped the DB locally restarted everything but its still the same.

Back to Top