Skip to content

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

@Johnywhisky

Description

@Johnywhisky

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions