I got this error TypeError: __init__() missing 1 required positional argument: 'strategy'
Johnywhisky opened this issue · 0 comments
Johnywhisky commented
Expected behaviour
Hi there, I've been making apple login backend server by using social-core package.
and when I run login view I got error like
TypeError: __init__() missing 1 required positional argument: 'strategy'
I tried to change some code but I'm still in error :(
plz let me fix this
my settings like this.
# settings.py
INSTALLED_APPS = [
"django.contrib.admin",
...
"rest_framework",
"social_core",
...
]
and I customized apple oauth class from here
# oauth.py
...
from social_core.backends.oauth import BaseOAuth2
from social_core.utils import handle_http_errors
class AppleOAuth2(BaseOAuth2):
name = "apple"
ACCESS_TOKEN_URL = "https://appleid.apple.com/auth/token"
SCOPE_SEPARATOR = ","
ID_KEY = "uid"
...