Django Rest Auth Social Login Issue, Error: "View is not defined, pass it as a context variable"

I just faced an issue with Django Rest Auth Social Login. When I try to use “SocialLoginView” I got error:

{
    "non_field_errors": [
        "View is not defined, pass it as a context variable"
    ]
}

If you are also facing this issue, check your pipfile or requirements.txt and the version of djangorestframework version.
For new app django scaffold has djangorestframework = "~=3.12.4". Change to djangorestframework = "~=3.11.1".
After changing the version I think it will work.
Thanks