Social network failure apple signing

Viewed 69

i have set up the apple signin in Django using SocialLoginView

settings.py

SOCIALACCOUNT_PROVIDERS = {
    "apple": {
        "APP": {
            # Your service identifier.
            "client_id": "com.test.web",

            # The Key ID (visible in the "View Key Details" page).
            "secret": "login with apple test",

            # Member ID/App ID Prefix -- you can find it below your name
            # at the top right corner of the page, or it’s your App ID
            # Prefix in your App ID.
            "key": "CCCDDDFAKE",

            "certificate_key": """-----BEGIN PRIVATE KEY-----
dfdfdfddfdfjsdhfksdjfkljsdkfjsdlkfjksdlfjkdsjfkdjsfjdfkjdjfkjkdf
MjqvQmfIotaSSRy/SkS9Kfagv/dkjfkjdfkjdfkjdkfjdkfjkdjfkjdfkjdfkjdf/s
/Kd41Y03f1mDR8D5/dfdfdfdf+dfdfdfdfdf
R3iwdyjH
-----END PRIVATE KEY-----"""
        }
    }
}

views.py

from allauth.socialaccount.providers.apple.views import AppleOAuth2Adapter,AppleOAuth2Client,AppleProvider
from dj_rest_auth.registration.views import SocialLoginView as AppleLoginView

class AppleLogin(AppleLoginView):
    adapter_class = AppleOAuth2Adapter
    callback_url = 'https://testssite.com/accounts/apple/login/callback'
    client_class = AppleOAuth2Client

urls.py

from django.urls import path, include
from . import views

urlpatterns = [

    path('accounts/', include('allauth.urls')),
    path('login/', views.AppleLogin.as_view()),
    path("", views.index, name="index"),
]

So far so good, if i go to mysite/accounts/apple/login i can provide my apple id. But then i get the message Social Network Login Failure Iam stuck with this, and dont know what is missing.

0 Answers
Related