https://django-rest-auth.readthedocs.io/en/latest/installation.html here is the official docs about social login in django-rest-auth. they say the way to make the LoginView(GithubLogin, FacebookLogin, etc..) inheriting SocialLoginView like this.
from allauth.socialaccount.providers.github.views import GitHubOAuth2Adapter
from allauth.socialaccount.providers.oauth2.client import OAuth2Client
from rest_auth.registration.views import SocialLoginView
class GithubLogin(SocialLoginView):
adapter_class = GitHubOAuth2Adapter
callback_url = CALLBACK_URL_YOU_SET_ON_GITHUB
client_class = OAuth2Client
but when i try to access the url with this as as.view(), they always say
{
"non_field_errors": [
"View is not defined, pass it as a context variable"
]
}
I tried the best. I have been suffering it for a few days. plz anybody save my life.. What's wrong with it? I've searched a lots but there wasn't any good answer for me.