social-core icon indicating copy to clipboard operation
social-core copied to clipboard

I got this error TypeError: __init__() missing 1 required positional argument: 'strategy'

Open Johnywhisky opened this issue 2 years ago • 0 comments

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"
    ...

Johnywhisky avatar May 19 '22 05:05 Johnywhisky